Closed DiemasMichiels closed 5 years ago
Hi, Rebass works a bit differently from Styled System from an API standpoint. The variant feature in both libraries works mostly the same, but the Rebass variants must be defined in the theme. You can extend a Rebass component with @emotion/styled
and use the variant
utility from Styled System, but I haven't tried this and it might or might not work like expected
That's what we expected. We are going with this approach:
add a variants.ts
file to your components where you handle all the component variants and type them. Include every variants.ts
file in your theme.variants.
@DiemasMichiels Can you post a gist of that approach?
Hi,
You just released inline variants for Styled-System v.5.1.0 Can we also do this with rebass? Are there any plans to do this or do we need to always define our variants in the theme file?
Thanks!