notbrain
notbrain

Reputation: 3396

flowbite-svelte component props boolean values

I'm playing around with flowbite-svelte and the NavBar component and setting fluid=true

<Navbar fluid=true> OR <Navbar fluid="true">

but in VSCode it's showing an error that string is not assignable to type 'boolean | undefined'. I'm following https://flowbite-svelte.com/docs/components/navbar#Default_navbar where it states to add fluid=true to do full width.

How can I get VSCode to not show this error?

enter image description here

Upvotes: 0

Views: 205

Answers (1)

notbrain
notbrain

Reputation: 3396

Was able to get VSCode to stop complaining with

<Navbar fluid={true}>

Including the brackets in the docs might help for folks new to the library who are using TS. Not sure if the same issue occurs for JS.

Upvotes: 0

Related Questions