-
Notifications
You must be signed in to change notification settings - Fork 6
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
Chore: Upgrade Skeleton to Chakra v3 #1515
base: update-chakra
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b4f44fc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
… with `loading` and updating `boxSize` to `size` in SkeletonCircle
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.
Noen få ting!
}, | ||
variant: { | ||
pulse: { | ||
background: "steel", |
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.
Vi må huske darkmode på denne, foreslår:
background: "steel", | |
background: { | |
_light: "silver", | |
_dark: "darkGrey", | |
}, |
shine: { | ||
"--animate-from": "200%", | ||
"--animate-to": "-200%", | ||
"--start-color": "colors.lightGrey", |
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.
"--start-color": "colors.lightGrey", | |
"--start-color": { | |
_light: "colors.lightGrey", | |
_dark: "colors.dimGrey", | |
}, |
"--animate-from": "200%", | ||
"--animate-to": "-200%", | ||
"--start-color": "colors.lightGrey", | ||
"--end-color": "colors.steel", |
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.
"--end-color": "colors.steel", | |
"--end-color": { | |
_light: "colors.platinum", | |
_dark: "colors.darkGrey", | |
}, |
defaultVariants: { | ||
variant: "pulse", | ||
loading: true, | ||
}, |
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.
Dette må slettes. Det er en bug at andre varianter arver verdier fra default variant. Definer det heller i props
export const Skeleton = forwardRef<HTMLDivElement, SkeletonTextProps>( | ||
function SkeletonText(props, ref) { | ||
const recipe = useRecipe({ recipe: skeletonRecipe }); | ||
const [recipeProps, restProps] = recipe.splitVariantProps(props); |
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.
Usikker på om denne trengs, eller om du bare kan legge props i recipe?
return ( | ||
<Circle size={size} asChild ref={ref}> | ||
<ChakraSkeleton {...rest} /> | ||
<ChakraSkeleton {...rest} loading={false} css={styles} /> |
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.
Jeg får error på loading her, noe type mismatch
Background
Upgrading to chakra 3 breaks default styling applied, so created a recipe.
Solution
Chakra update checklist
UU checks