-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panda CSS v3 #267
base: v3
Are you sure you want to change the base?
Panda CSS v3 #267
Conversation
|
@ImExoOdeex is attempting to deploy a commit to the saas-js Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work so far!
|
||
## Panda | ||
styled-system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styled-system folder was checked into git even though this rule was added.
Can you make sure it gets removed?
This should work I think
git rm -rf packages/saas-ui-panda/styled-system
packages/saas-ui-panda/package.json
Outdated
@@ -0,0 +1,72 @@ | |||
{ | |||
"name": "@saas-ui/panda", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call it panda-preset
, or do you think the preset should be a separate package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, at the end it will only contain the preset
packages/saas-ui-panda/package.json
Outdated
}, | ||
"author": "ImExoOdeex <[email protected]>", | ||
"dependencies": { | ||
"@chakra-ui/panda-preset": "^3.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Saas UI v3 has it's own tokens we should not extend the chakra ui panda preset.
|
||
export type AccordionProps = ComponentProps<typeof Root> | ||
|
||
export const Root = withProvider(styled(ArkAccordion.Root), 'root') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wrap the primitives with styled
in the withProvider and withContext
factory functions instead. This will clean up the components itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posted an example in the context.tsx
file review. Ping me on discord if you're not sure how to do it.
Component: T, | ||
slot?: StyleSlot<R> | ||
): ComponentVariants<T, R> => { | ||
const StyledComponent = forwardRef((props: any, ref) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be similar to how chakra ui does this.
const SuperComponent = styled(Component)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
return ( | ||
<StyleContext.Provider value={slotStyles}> | ||
<Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then here <SuperComponent
|
||
return ( | ||
<Sidebar.Provider {...ctx}> | ||
<Box ref={rest.ref} {...styleProps}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally the provider does not render any element, just the provider just like the Chakra UI version.
feat: improve types
fix: exports
No description provided.