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: Add ability to pass through heading props #1895

Merged
merged 7 commits into from
Apr 5, 2022

Conversation

brandonlenz
Copy link
Contributor

@brandonlenz brandonlenz commented Feb 3, 2022

Summary

Adds the ability to pass through props to the heading element.
Also restructures classNames internally so that we don't destructively assign classNames to elements if their passthrough props include a className.

This is important for being able to set accessible identifiers on the various elements (for instance using aria-labelledby and referencing the id of the heading element)

How To Test

Tested by locally pulling in dependency into my Truss project.
Also added unit tests.

No user facing changes. Backwards compatible, unless users were clobbering the default classNames with the various passthrough props we made available, but that feels more like fixing a bug than anything to me.

- Ensure classNames are not destructive when passed
@brandonlenz brandonlenz changed the title Add ability to pass through heading props feat: Add ability to pass through heading props Feb 3, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2022

Warnings
⚠️ This PR does not include changes to storybook, even though it affects component code.

Generated by 🚫 dangerJS against 823407f

hgarfinkle
hgarfinkle previously approved these changes Feb 3, 2022
@brandonlenz brandonlenz requested a review from a user April 5, 2022 14:28
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.

4 participants