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

Allow sizing of Pagination Buttons #214

Closed
julianYaman opened this issue Jun 8, 2022 · 6 comments
Closed

Allow sizing of Pagination Buttons #214

julianYaman opened this issue Jun 8, 2022 · 6 comments
Labels
needs info Further information is requested

Comments

@julianYaman
Copy link

Is your feature request related to a problem? Please describe.
I would like to have a Button group of small buttons in the same row as the Pagination component.
But that's not really the issue. I just would like them to have the same size (small in this case).

Describe the solution you'd like
Add an attribute to allow for sizing of the Pagination component buttons

Describe alternatives you've considered
There aren't really any alternatives. Maybe to make the buttons larger again, which I don't really prefer.

Additional context
Bildschirmfoto 2022-06-09 um 01 39 48

@rluders
Copy link
Collaborator

rluders commented Jun 9, 2022

It is already possible, if I'm not wrong. The buttons doesn't have defined sizes by default, they will fit to the parent size. It means that, if you do something like:

<Button.Group>
  <div className="w-10">
    <Button color="gray">Profile</Button>
  </div>
  <div className="w-10">
    <Button color="gray">Settings</Button>
  </div>
  <div className="w-10">
    <Button color="gray">Messages</Button>
  </div>
</Button.Group>

It should limit the size of the buttons. Could you please check if it works for you?

@rluders rluders added the needs info Further information is requested label Jun 9, 2022
@rluders
Copy link
Collaborator

rluders commented Jun 13, 2022

@julianYaman does it help?

@julianYaman
Copy link
Author

Hey @rluders sorry, missed replying to you. Had my final exams recently.
I'm going to try it with your solution, thanks 👍

@tulup-conner
Copy link
Collaborator

@rluders That solution doesn't work because ButtonGroup currently assumes the immediate children are Buttons. We might need to add a ButtonGroupContext and switch off of prop drilling to allow that behavior.

@tulup-conner
Copy link
Collaborator

See related #318

@rluders
Copy link
Collaborator

rluders commented Dec 5, 2022

This can be done by using the theme system.

@rluders rluders closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants