Skip to content

Fix slug heading styles in Heading component#613

Closed
arpitjain099 wants to merge 2 commits into
cfpb:mainfrom
arpitjain099:chore/fix-slug-component-578
Closed

Fix slug heading styles in Heading component#613
arpitjain099 wants to merge 2 commits into
cfpb:mainfrom
arpitjain099:chore/fix-slug-component-578

Conversation

@arpitjain099

@arpitjain099 arpitjain099 commented Jun 17, 2026

Copy link
Copy Markdown

The Slug heading markup has the right classes now, but the DS slug stylesheet was not being pulled into DSR, so the component could still render without the expected border and typography treatment.

This updates Heading to import the DS slug-header styles, tightens the slug unit test to assert the real BEM class, and adds a Storybook play assertion for the slug wrapper and heading classes.

Verified locally with:

  • npx -y @yarnpkg/cli-dist@4.16.0 prettier --check src/components/Headings/heading.tsx src/components/Headings/heading.test.tsx src/components/Headings/headings.stories.tsx
  • npx -y @yarnpkg/cli-dist@4.16.0 eslint src/components/Headings/heading.tsx src/components/Headings/heading.test.tsx src/components/Headings/headings.stories.tsx
  • npx -y @yarnpkg/cli-dist@4.16.0 vitest run src/components/Headings/heading.test.tsx
  • npx -y @yarnpkg/cli-dist@4.16.0 build

Closes #578

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@flacoman91

Copy link
Copy Markdown
Collaborator

Thanks @arpitjain099 !

This is actually a great catch. the included scss is necessary for the published library. It may seem okay in storybook since it loads everything in a _shared.scss

@flacoman91

Copy link
Copy Markdown
Collaborator

For some reason our automatic tests wont run on forks.
I created another pr #618
to verify this

@flacoman91 flacoman91 closed this Jun 18, 2026
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.

Bug: Slug component in DSR does not match the DS component

2 participants