Skip to content

Add heading component#123

Merged
TomWoodward merged 4 commits into
mainfrom
add-heading-component
Jul 1, 2026
Merged

Add heading component#123
TomWoodward merged 4 commits into
mainfrom
add-heading-component

Conversation

@TomWoodward

Copy link
Copy Markdown
Member

some downstream projects (found in assignments and staxpass at least) were using the as prop on the headings, the new Heading component replaces that pattern.

@TomWoodward TomWoodward requested a review from RoyEJohnson June 26, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Heading component to replace downstream usage of an as prop on existing heading components, allowing semantic heading level (h1h6) to be independent from the applied visual style.

Changes:

  • Introduces Heading with level/variant props and ref forwarding, and refactors H2/H3 to use it.
  • Adds a Storybook story demonstrating semantic level vs visual style override.
  • Bumps package version and removes the .lastsync file.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/components/Text.tsx Adds Heading and refactors H2/H3 to build on it.
src/components/Text.stories.tsx Demonstrates Heading usage, including style override.
package.json Patch version bump for the new exported component.
.lastsync Removes an unreferenced sync marker file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Text.tsx
Comment thread src/components/Text.tsx
Comment thread src/components/Text.tsx
Comment thread src/components/Text.tsx

@RoyEJohnson RoyEJohnson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Copilot suggestion for a test is good, but the question of handling levels default variants with levels of other than 2 or 3 needs cleared up.

@TomWoodward

Copy link
Copy Markdown
Member Author

i added the spec. i'm not gonna do anything on the variant types because there is really no rationale behind it other than the variants that we happen to have styles for today, the extra classes won't hurt anybody, and it'll work if we decide to add styles for them later.

@TomWoodward TomWoodward requested a review from RoyEJohnson June 29, 2026 19:56
@TomWoodward TomWoodward merged commit c8a6ad5 into main Jul 1, 2026
2 of 3 checks passed
@TomWoodward TomWoodward deleted the add-heading-component branch July 1, 2026 13:30
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