[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.
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.divis not helpfulclassesAPI