-
Notifications
You must be signed in to change notification settings - Fork 38
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): Add variant
prop with long
and short
#1636
Conversation
Preview deployments for this pull request: 📖 Storybook 🖥 Storefront See all deployments at https://dev.designsystemet.no |
Hmm, curious if we should just introduce a |
I don't think we should, since |
hmm, we already have I kinda dont think we should use Hmm, any other suggestions for names? Or we just keep it |
If we can't think of anything better I suggest we keep it as |
|
long
typevariant
prop with long
and short
packages/react/src/components/Typography/Paragraph/Paragraph.tsx
Outdated
Show resolved
Hide resolved
short?: boolean; | ||
/** Variant of the paragraph */ | ||
variant?: 'long' | 'short'; |
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.
Should we maybe add default
so it matches the behaviour of our other variant
props? It won't do anything but would make life easier for projects like Studio where user can select these props. 🤔
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.
hm not sure 🤔 It won't hurt to add it, since it does not do anything - your call 😃
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.
We decided to go for variant
.
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.
In reality we have three different line height. We didn't add a default
option in variant
as the "default" line-height is backed into the variable used for font
and it might be changed with static typography. We will add the third option later when the dust has settled for that. #1707
Co-authored-by: Michael Marszalek <[email protected]>
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 👍
Added an issue so we remember to the "missing"/default line-height in the future #1707
Resolves #1476
This PR deprecates
short
, and users will now usevariant
to setshort
orlong
.short
will be removed in #1702