kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.dev
MIT License
1.22k stars 62 forks source link

Add a export for `usePaginationContext` #382

Closed welpie21 closed 3 weeks ago

welpie21 commented 5 months ago

Is your feature request related to a problem? Please describe. I'm making a implementation of the pagination component and want to style it. But since I want to re-use a existing component called Button. I have no way to control the behaviour of the button for example when it's active or not.

Describe the solution you'd like Exporting the usePaginationContext will give me the needed properties to match what active is or not. And if the current page on the item is active I can set the property ( which is custom ) to something.

Describe alternatives you've considered Since the're no other properties exposed I have not found an alertnative solution to my problem.

Additional context the Button has a variant prop with the values light, filled, outlined, etc. When a button is active the variant should be filled instead of light. Since there is no property I can grab to match against something, that this is kind of a dead end for me.