-
Notifications
You must be signed in to change notification settings - Fork 48
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
Core upgrade xstyled styled components v6 #2436
Conversation
P1X3L
commented
Mar 27, 2024
- use xstyled fork with styled-components v6.1.8
- upgrade styled-components peer dep to v6.1.8
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
Signed-off-by: Paul-Xavier Ceccaldi <[email protected]>
6ff3875
to
4d86cd8
Compare
@@ -19,7 +19,7 @@ Here you'll find all the core components you need to create a delightful webapp. | |||
1 - Install the **peer dependencies** listed below: | |||
|
|||
```bash | |||
yarn add @xstyled/styled-components react styled-components | |||
yarn add @wttj/xstyled-styled-components react styled-components |
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.
is it public ?
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.
Not yet but it's will be discuss tomorrow :)
*/ | ||
export const system = compose<WuiSystemProps>(...SYSTEM_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.
since we've stopped using it in favor of *Box components; should we remove it from the exports ?
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.
We still need it to be able to override style props in particular use cases
${lines && | ||
lines !== Infinity && | ||
Object.keys(lineHeightHeadingsFixer).includes(variant) && | ||
fixLineHeightStyles(variant)}; |
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.
i dont understand how this is related to the upgrade ?
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.
It has nothing to do with the upgrade indeed 🙈
Just couldn't keep up with those g, y, q, j and p being cut
export const getMax = ( | ||
width: SystemProp<string | number, Theme>, | ||
height: SystemProp<string | number, Theme> = width | ||
): SystemProp<string | number, Theme> => { | ||
const typeToValueExtractor: Record< | ||
string, | ||
(value: SystemProp<string | number, Theme>) => number | ||
> = { | ||
string: (value: string) => parseInt(value, 10), | ||
number: (value: number): number => value, | ||
} | ||
const widthNumber = | ||
typeToValueExtractor[typeof width as keyof typeof typeToValueExtractor]?.(width) || 0 | ||
const heightNumber = | ||
typeToValueExtractor[typeof width as keyof typeof typeToValueExtractor]?.(height) || 0 | ||
const diff = widthNumber - heightNumber |
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.
i dont see the problem that has been solved here, could you clarify 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.
the width
andheight
arguments were typed as string
but have been enriched after the upgrade of xstyled & styled-components resulting in type errors
b81e57c
to
1c313e7
Compare
1c313e7
to
ab2bbbc
Compare
Replaced by #2466 |