-
Notifications
You must be signed in to change notification settings - Fork 14
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
docs(723): Standfirst Storybook Enhancement #881
Conversation
You can preview these changes on: |
overrides={{ | ||
styledText: { | ||
stylePreset: 'standfirstCustom', | ||
typographyPreset: 'utilitySubheading020', |
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.
When is default I am expecting it not to have any overrides
overrides={{ | ||
styledText: { | ||
typographyPreset: 'utilitySubheading020', | ||
stylePreset: 'standfirstCustom', |
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.
You can use directly inkBrand010
as style-preset, not need to create a custom one, newskit automatically creates style presets for all colors tokens which start with ink
stylePreset: 'standfirstCustom', | |
stylePreset: 'inkBrand010', |
const CONTENT = ( | ||
<TextBlock typographyPreset="utilitySubheading020"> | ||
NewsKit provides components, guidelines and standards to enable digital | ||
product teams to create high-quality, consistent products quickly. NewsKit | ||
is built on modular design principles and backed by best practice guidance | ||
for design and development. | ||
</TextBlock> | ||
); |
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.
Why do you use text-block with typographyPreset to pass it down to the standfirst component?
Is that required by design? if so this needs to change, that's not how we suggest this component to be used
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.
@mutebg as per design its typographyPreset="utilitySubheading020"
by default we have
typographyPreset: {
xs: 'editorialSubheadline010',
lg: 'editorialSubheadline020',
},
So I have added text-block component to update the typographyPreset
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.
the designs are wrong, the default version is without any props and overrides
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.
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.
@nathanparris this exactly what I meant. thanks for clarifying it
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.
done @mutebg @nathanparris. By default will be having
typographyPreset: {
xs: 'editorialSubheadline010',
lg: 'editorialSubheadline020',
},
> | ||
{bodyString} | ||
</Standfirst> | ||
<Standfirst as="h2">{CONTENT}</Standfirst> |
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.
since this is default story, I would remove as="h2" prop
closes #723
What
I have done:
I have tested manually:
Before:
After:
Who should review this PR:
How to test: