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

create HeadingComponent #11

Merged
merged 15 commits into from
Feb 23, 2025
Merged

Conversation

05kl
Copy link
Contributor

@05kl 05kl commented Dec 2, 2024

solves #6

Copy link
Member

@TeamBattino TeamBattino left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Please format the file. Tip: turn on format on save


function HeadingComponent({text, textAlign}: HeadingComponentProps){
return (
<div style={{padding: 64}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this padding needed, or is there a way to use the margin and min-height on the h1 tag?

textAlign: any,
};

function HeadingComponent({text, textAlign}: HeadingComponentProps){
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, make sure the component is export default.

puck.config.tsx Outdated
Comment on lines 33 to 35
</div>
),
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you created the component can you please also remove the HeadingBlock component here. It's no longer needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also think about what this component does. How can you add different heading levels, like h1, h2 or h3?
I suggest we add a level prop to this component and make the user choose it.

@05kl 05kl requested a review from silvio2402 January 6, 2025 09:43
@silvio2402 silvio2402 merged commit 3af8697 into PfadiMH:master Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants