themesberg / flowbite-svelte

Official Svelte components built for Flowbite and Tailwind CSS
https://flowbite-svelte.com
MIT License
2.24k stars 274 forks source link

Gallery component doesn't accept `class` as a valid property #1471

Closed aldelucca1 closed 4 weeks ago

aldelucca1 commented 1 month ago

Describe the bug

The Gallery component no longer accepts the class prop as a valid component property. When running svelte-check the following error is produced:

Error: Type '{ class: string; }' is not assignable to type 'HTMLAttributes<HTMLDivElement> & { items: ImgType[]; imgClass?: string | undefined; }'.
  Property 'items' is missing in type '{ class: string; }' but required in type '{ items: ImgType[]; imgClass?: string | undefined; }'. (ts)

Reproduction

<Gallery class="grid-cols-6 gap-4">
    ...
</Gallery>

Flowbite version and System Info

"flowbite": "^2.5.2",
"flowbite-svelte": "0.47.1",
"svelte": "^4.2.19",
"svelte-check": "^4.0.5"
shinokada commented 1 month ago

That's strange. When I run pnpm check, I don't get any error.

image
shinokada commented 1 month ago

Try pnpm format && pnpm lint to see any other problems.

aldelucca1 commented 4 weeks ago

If this can't be reproduced it could be something specific to my setup, closing