brand icon indicating copy to clipboard operation
brand copied to clipboard

🐛 [BUG] - Margin removed when using a `className` with `Hero.Label`

Open simurai opened this issue 1 year ago • 1 comments

Describe the bug

When adding a className to a Hero.Label, it removes the bottom margin.

Reproduction steps

  1. Go to https://primer.style/brand/components/Hero/react
  2. In the editor, add className="someClass" to the Hero.Label of the first example.
  3. Notice how the bottom margin is gone.

I think the Hero-module--Hero-label--C\+rTh class (that adds the bottom margin) gets removed from the DOM once a custom class is added?

Expected behavior

The bottom margin should stay.

Screenshots

Screenshot of a label without bottom margin

Browsers

Chrome

OS

Mac

simurai avatar Sep 17 '24 11:09 simurai

Good spot, thanks @simurai.

I've got a PR here which resolves the issue

https://github.com/primer/brand/pull/760

joshfarrant avatar Sep 18 '24 08:09 joshfarrant

Closing as the fix has shipped in v0.41.0

rezrah avatar Nov 01 '24 09:11 rezrah