-
Notifications
You must be signed in to change notification settings - Fork 674
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
Remove sx props from Paragraph component #1476
Comments
Hi @aaronadamsCA 👋 Thanks for the issue! |
Alright, now that you mention it, I agree that such opinionated style should rather be set in a theme. It is fairly easy to set it globally in the "text.paragraph" variant, and much harder to unset indeed. (I had similar issues recently with Checkbox, Radio and Switch, ended up building custom components instead) Should we move that to the base preset perhaps? And/or some others, I do not know all of them, so just mention which ones? |
Currently margins are not working ( |
I am pretty sure @hasparus any chance you know what was/is the intent and status behind those "shortcut" props? I am also curious (they are still mentioned in some examples of the doc I think) |
@flo-sch No idea TBH, mate. I remember jxnblk's comment he wanted to move towards My opinion on this is:
|
I found something in the documentation... - https://dev.theme-ui.com/components/#style-props |
theme-ui/packages/components/src/Paragraph.js
Lines 14 to 22 in 29b9b37
While I appreciate the intent, this makes it really tough to use
Paragraph
except for one very specific use case. It takes a specificity hack to defeat it using the theme:I think the
margin
reset probably belongs in a base theme, and themaxWidth
is an interesting idea that could be mentioned in the documentation or included in a paragraph variant in one of the themes.The text was updated successfully, but these errors were encountered: