thisbeyond / solid-select

The Select component for Solid.
https://solid-select.com
MIT License
172 stars 18 forks source link

resolve type naming collision & exposing all type / interface by default #32

Closed xstevenyung closed 1 year ago

xstevenyung commented 1 year ago

Hello Martin,

I was using solid-select on an Astro project and wanted to wrap my select with a custom component to customize the behavior.

I found out that not a lot of types are available by default, which make type-safe wrapping hard to do.

I started exporting all types possible, but stumble upon a type name collision on Option and Value in create-select.tsx

I took the liberty to rename them respectively to RawOption and RawValue (not sure if the names fit here, I'm open to any suggestion you might have).

Besides of that, this will make creating your own Select component using the createOptions primitive a little bit type-safer, as it's now possible to access the different type.

Thanks for your work on solid-dnd & solid-select ❤️

martinpengellyphillips commented 1 year ago

Thanks for this - I'll take a look over the next week or so.