IHIutch / draft-ui

A collection of simply designed React components focused on making web accessibility as easy as copy & paste.
https://draft-ui.com
MIT License
338 stars 7 forks source link

fixed vertical slider example #2

Closed GregorGabric closed 11 months ago

GregorGabric commented 11 months ago

Hey, apologies for not giving the clarification, will do so in the future.

As for the height on the SliderTrack, doesn't it make more sense for the parent element to have the specified height?

Height is given to the parent in this example from react aria

Kind regards

IHIutch commented 11 months ago

Good thought. In that example, the height must be given to the outer most parent because it is what can accept style props. With that contrived example, there would be no way to adjust height, except to change the CSS. In our case, we do have access to SliderTrack and can style it directly. Because of this, we only have to worry about the relationship of 2 elements, rather than 3. Further, other elements can exist within Slider which could affect it's overall height, like SliderOutput.

GregorGabric commented 11 months ago

May I help with anything else?

IHIutch commented 11 months ago

You're welcome to contribute as you like. If you find any other issues or want to add a new example, feel free to suggest something. It might be easier to add issues first, as a way to ideate and focus, then submit a PR against the issue(s)