How to add sx prop to user-defined component? #2118
Answered
by
hasparus
PeterlitsZo
asked this question in
Q&A
-
I use this to did it, but I am not sure...: const Comp = (props) => {
<div className={props.className} sx={{width: 1}}/>
} I find if I use: <Comp sx={{height: 1}} /> It will set the If it true, I can help you to update document in sx-prop. |
Beta Was this translation helpful? Give feedback.
Answered by
hasparus
Feb 7, 2022
Replies: 1 comment 2 replies
-
If you use JSX pragma, every Do you think this is something that's not covered in the docs too well? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
PeterlitsZo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use JSX pragma, every
sx
gets translated intoclassName
, what's more, you can combinesx
andclassName
and they will be merged.Do you think this is something that's not covered in the docs too well?