Skip to content
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(admin-ui): handle typography - add Heading and Text components #4230

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

leopuleo
Copy link
Contributor

Changes

With this PR, we add two new UI components to handle typography: Heading and Text.
The previously used Typography component will render Heading or Text component based on the value inside the use prop.

Heading

Used to render heading elements, such as h1 -> h6.

It accepts the following props:

  • level: it controls the heading level from 1 to 6 and how it renders (as defined in Figma);
  • as: used to override the renderer tag, so we can make an <h3> to look like a <h1> visually (optional).
  • text: used to pass the text to render.

Text

Used to render text elements, such as div or span.

It accepts the following props:

  • size: it controls the text size as defined in Figma;
  • as: used to specify the tag used by the component: div or span (optional).
  • text: used to pass the text to render

@leopuleo leopuleo added the ui label Aug 20, 2024
@leopuleo leopuleo self-assigned this Aug 20, 2024
Copy link
Member

@adrians5j adrians5j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good... just a couple of short questions. :)

packages/ui-new/src/Heading/Heading.tsx Outdated Show resolved Hide resolved
packages/ui-new/src/Heading/Heading.tsx Outdated Show resolved Hide resolved
packages/ui-new/src/Text/Text.tsx Show resolved Hide resolved
packages/ui/src/Typography/Typography.tsx Show resolved Hide resolved
@leopuleo leopuleo merged commit 93700d1 into feat/new-admin-ui Aug 21, 2024
70 of 92 checks passed
@leopuleo leopuleo deleted the leo/feat/ui-typography branch September 9, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants