-
Notifications
You must be signed in to change notification settings - Fork 0
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
Typography component #17
Conversation
|
||
export interface HeadingProps { | ||
level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5'; | ||
children: React.ReactNode; |
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 property children
refers multiple elements but it can be defined as text
and the type can be string.
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.
But I'm thinking that if we need to add, for example, a span
tag around some of the text for whatever reason, this can be done. Plus it simulates the original heading and paragraph tags
<Heading level="h1">Some <span className="color-red">text</span></Heading>
export interface TextProps { | ||
size?: 'default' | 'small' | 'tiny'; | ||
weight?: 'regular' | 'bold'; | ||
children: React.ReactNode; |
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.
Same here.
Create Heading and Text component