Can't access theme from styled component and question about sx props vs style props #1567
Unanswered
coreybruyere
asked this question in
General
Replies: 1 comment 11 replies
-
|
Could you share your whole component? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a React TS-based design system built with emotion, styled-system, and theme-ui and am encountering a TS error I can't seem to resolve. It seems like a simple fix, I just haven't been able to debug it.
I found a work around by just using
bg, so utilizing styled function props, and I plan on utilizing thesxprop for all other styling needs.The error is:
Property 'colors' does not exist on type 'Theme'.I'm trying to access
themein a styled component with:My question is: Why isn't it possible to style utilizing the theme prop inside of a styled component?
Beta Was this translation helpful? Give feedback.
All reactions