-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Avatar] Use styled-components #21104
Conversation
Just for my own understanding, how many does JSS have? It’s 1 as well, right? |
You can create as many as you want with I'm pretty sure we can't (no default theme) and shouldn't (possible collision with existing theme) use the theming of styled-components. |
Oh right, but we’re also not currently using it but defining our own context? Didn’t find references to |
We have our own bindings to jss in |
Cool, was just trying to compare the two approaches because that point stood out to me. |
import Person from '../internal/svg-icons/Person'; | ||
|
||
export const styles = (theme) => ({ | ||
export const 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.
For future reference: Should be possible to move this into the typescript definitions and get rid of the size cost + get documentation on the classes in the editor. Would need to update the documentation generation to read from the proptypes instead though.
Quick prototype on how to migrate to styled-components (definitely need a codemod).
theme.props
(implemented) andtheme.overrides
(not implemented yet) might be awkwardstyled.div
is not helpfulclasses
API