-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: Add Heading #29592
Components: Add Heading #29592
Conversation
Size Change: +989 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
Taking a look at the failing snapshots now. From what I can see... the |
@ItsJonQ Those diffs were unreadable, but it was because of the |
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.
@sarayourfriend Thank you for adding this! I left a couple of comments for copy changes in README/types. That's 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.
The code looks great! 👌
But I'm seeing this error when I try to run storybook:
packages/components/src/ui/heading/hook.ts:64:29 - error TS2345: Argument of type 'HeadingSize' is not assignable to parameter of type 'number | undefined'.
Type '"1"' is not assignable to type 'number | undefined'.
64 size: getHeadingFontSize( level ),
I guess whether getHeadingFontSize
should accept strings or we should cast level
to a number.
@diegohaz That's interesting, have you run |
Ah, you're right! I forgot to |
0250ebc
to
672ebd6
Compare
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.
🚀 from me! Thanks @sarayourfriend + @diegohaz !
The a11y prop improvement is really neat!
Description
Adds a new
Heading
component. Also upgrades G2 so make sure tonpm install
when testing.@diegohaz can you review this from an a11y perspective, especially regarding not using the semantichx
elements for this?How has this been tested?
Storybook and unit tests
Screenhots
Types of changes
New feature
Checklist: