-
Notifications
You must be signed in to change notification settings - Fork 672
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
feat: paragraph component #1298
Conversation
- default to HTML "<p>" element - add a few unit tests
First try, let me know what you guys think? @atanasster @isaac-martin @hasparus Few notes:
|
|
||
# Paragraph | ||
|
||
Primitive typographic component for text blocks, defaults to `<p>`, and without margin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick. There's something not right with this sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like my frenglish, perhaps? 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I'll wait for second opinion for a bit, but it's okay to merge I think
Looks great - just a few small items
|
Yes, please. Default max-width. We can set something simple there like We use the last value from |
Alright, the reason for using the same themeKey is the consistency with Heading: why would heading variants be based on theme.text when paragraphs are separated? But if you think it is better, I will add it |
@flo-sch - sorry, I meant the variant (default vs paragraph) - and I called it incorrectly |
Ah alright, yes no problem with a default |
Tailwindcss also resets margins to 0 for paragraph (i think it comes from normalizecss) |
Box already does that, that's why I did not, but perhaps it is good not to rely on inherited here? |
I think users are complaining Box does it, since its supposed to be non-opinionated. Its up to you though, i am just drafting suggestions as they come to mind. Your PR looks fantastic in any way. |
- set margin: 0 - set maxWidth - update snapshots
- mention default 'paragraph' variant
I have added those defaults as part of |
excellent, lgtm |
Sweat :) I have no clue how the release works here, so I would rather have someone knowing it merging the PR whenever they think it's time Do not hesitate if you feel something should be added? |
Relates to #1250
Add a new
<Paragraph />
component, defaulting to HTML<p>
element (getting the semantics).Also add a new doc page for it.