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

Different heights of buttons in Button.Group when text is rendered in more than one line due to lack of space #855

Open
victorfunes opened this issue Jul 13, 2023 · 1 comment
Labels
🐛 bug Something isn't working confirmed This bug was confirmed good first issue Good for newcomers
Milestone

Comments

@victorfunes
Copy link

  • [ Yes ] I have searched the Issues to see if this bug has already been reported
  • [ Yes ] I have tested the latest version

Steps to reproduce

  1. Define a Button.group with different number and length of words and shrink the space available for all the component

Current behavior

Now each button has a different height depending on the words of each button:

image

Expected behavior

All the buttons should have the same height.

Context

I was checking responsive design for mobile devices, and I have seen this strange behaviour.

        <Button.Group>
          <Button size="sm" color="light" onPointerDown={filterLastYear}>
            <span className={internalFilterDate === FilterDate.LAST_YEAR ? selectedButtonClassname : undefined}>
              Last year
            </span>
          </Button>
          <Button size="sm" color="light" onPointerDown={filterLastMonth}>
            <span className={internalFilterDate === FilterDate.LAST_MONTH ? selectedButtonClassname : undefined}>
              Last 30 days
            </span>
          </Button>
          <Button size="sm" color="light" onPointerDown={filterLastWeek}>
            <span className={internalFilterDate === FilterDate.LAST_WEEK ? selectedButtonClassname : undefined}>
              Last 7 days
            </span>
          </Button>
          <Button size="sm" color="light" onPointerDown={filterAlways}>
            <span className={internalFilterDate === FilterDate.ALWAYS ? selectedButtonClassname : undefined}>
              Always
            </span>
          </Button>
        </Button.Group>
@rluders rluders added 🐛 bug Something isn't working confirmed This bug was confirmed labels Jul 13, 2023
@tulup-conner tulup-conner added this to the 1.0.0 milestone Jul 13, 2023
@rluders rluders added the good first issue Good for newcomers label Jul 25, 2023
@000000armor
Copy link
Contributor

@rluders Hi! I opened a PR with a fix. Please check it when it's possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working confirmed This bug was confirmed good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants