sek-consulting / solid-ui

Beautifully designed components. Built with Kobalte & corvu. Styled with Tailwind CSS.
https://www.solid-ui.com
MIT License
674 stars 25 forks source link

Incorrect types for button #89

Closed aellerton closed 1 month ago

aellerton commented 1 month ago

Hi there,

I've been working on a project that uses solid-start and solid-ui and, though I love them both, I keep running into issues with types and things not quite working properly.

I've created a separate public repo that can serve as a place to try out components and prove if issues are real or not:

https://github.com/aellerton/solid-issues/tree/main/solid-sek

The repo is brand new and "off the shelf", adding a Button component. It works, but the types aren't right: image

Specifically:

Type '{ children: string; }' has no properties in common with type 'IntrinsicAttributes & ButtonProps'

Clicking on that issue I get to:

image

'index' has no exported member named 'ButtonRootProps'. Did you mean 'ButtonRootOptions'

As it's a fresh repo with vanilla everything, I'm confident this isn't something I've done in my setup.

To be clear, the demo runs fine, but the types don't seem to be quite right.

Any guidance would be most appreciated!

aellerton commented 1 month ago

A similar issue happens with tabs:

image

Type '{ children: Element[]; class: string; }' is not assignable to type 'IntrinsicAttributes & TabsListOptions & Partial'. Property 'children' does not exist on type 'IntrinsicAttributes & TabsListOptions & Partial'

sek-consulting commented 1 month ago

Looks like you're using Kobalte v0.13 which solid-ui doesn't support yet. I'm working on updating every single component but for the meantime please set Kobalte to v0.12.6 in the package.json

87

aellerton commented 1 month ago

Thanks for that Stefan, and thanks for the great library. Your efforts are appreciated!

I did try that but it said no such version. However, it's possible I used 0.12.7 or something silly. I'll try again later.

On Sun, 12 May 2024, 18:16 Stefan E-K, @.***> wrote:

Looks like you're using Kobalte v0.13 which solid-ui doesn't support yet. I'm working on updating every single component but for the meantime please set Kobalte to v0.12.6 in the package.json

— Reply to this email directly, view it on GitHub https://github.com/sek-consulting/solid-ui/issues/89#issuecomment-2106196150, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMJISXLCFACAFCKDNBUTLZB46QDAVCNFSM6AAAAABHQJBBAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGE4TMMJVGA . You are receiving this because you authored the thread.Message ID: @.***>

aellerton commented 1 month ago

Works nicely with 0.12.6 - thank you!