-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: use styled-system v5 #422
Conversation
6b5b33a
to
928d7a8
Compare
toRem(768), | ||
toRem(992), | ||
toRem(1200), | ||
]; |
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.
https://github.com/styled-system/styled-system/blob/master/packages/core/src/index.js#L62
因為 v5 新增了 cache breakpoints 的功能,但他們實作上只支援 array
所以這邊把 sm / md / lg / xl 的 alias 拿掉了
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.
這樣對tailor ui 來說是 breaking change QQ?
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.
但事實上我們沒有用這個功能 XD
<Radio value="en_US">English</Radio> | ||
<Radio value="zh_Hant">正體中文</Radio> | ||
</RadioGroup> | ||
|
||
<Box mt="3"> | ||
<UIProvider locale={locales[value]}> |
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.
改成使用全域的 UIProvider 避免多個 Provider 打架
docs/UIProvider.md
Outdated
const [visible, setVisible] = useState(false); | ||
const modal = useModal(); | ||
|
||
return ( | ||
<> | ||
<RadioGroup value={value} onChange={setValue}> | ||
<RadioGroup value={locale} onChange={newLocale => setLocale(newLocale)}> |
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.
這個不能直接傳 setLocale 嗎? onChange={setLocale}
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.
已改
xl: string; | ||
} | ||
string | ||
]; |
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.
寫了 4 個 string 耶
928d7a8
to
eabe01d
Compare
JustifyContentProps; | ||
|
||
const flex = compose(box, alignItems, flexDirection, justifyContent, flexWrap); | ||
export type FlexProps = BoxProps; |
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.
這邊看不懂,其他的拿掉了?
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.
v5 把一些相關的 API 整合在一起,詳見:https://styled-system.com/table
related #416
之前的 breaking 好像消失了,穩穩升