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

Typography component #17

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Typography component #17

merged 2 commits into from
Feb 1, 2024

Conversation

adrielTosi
Copy link
Collaborator

Create Heading and Text component

Copy link

aem-code-sync bot commented Jan 31, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits


export interface HeadingProps {
level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5';
children: React.ReactNode;
Copy link
Collaborator

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.

Copy link
Collaborator Author

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;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here.

@adrielTosi adrielTosi merged commit 6bb4f12 into main Feb 1, 2024
1 of 2 checks passed
@adrielTosi adrielTosi deleted the feature/typography branch February 1, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants