openedx / paragon

💎 An accessible, theme-ready design system built for learning applications and Open edX.

Home Page:https://paragon-openedx.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<Badge> inside <Button> is inconsistent between themes.

bradenmacdonald opened this issue · comments

When a <Button size="sm"> contains a <Badge> element:

  1. Bug: with the edx.org theme, the button grows in height and is no longer consistent with other size="sm" buttons:
    Screenshot 2024-03-26 at 12 26 38 PM
    Compare to without a badge, where the buttons had the same height:
    Screenshot 2024-03-26 at 12 38 22 PM
  2. Bug?: with the Open edX theme, the badge preserves the button's height correctly but seems like it could use a bit more padding above and below the badge text ("+2" here).
    Screenshot 2024-03-26 at 12 30 03 PM
  3. Neither the <Badge> nor <Button> docs page have any examples of a badge inside a button, but I think this should be shown as a supported example. It is in Bootstrap docs and Flowbite docs for example.

Context, FWIW: building a button with a dropdown to select filter options, like this:

Screenshot 2024-03-26 at 12 25 53 PM