themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.9k stars 425 forks source link

Override className is not working #334

Closed SerGem811 closed 2 years ago

SerGem811 commented 2 years ago

I can see that Navbar has property of className but when i put class there (tailwind for example, bg-black), it is not working!! From the inspect i can see that even it is not there.

Kindly fix it

Mine react: 17.0.2 flowbite-react: 0.1.8 next: 12.0.4

Regard

rluders commented 2 years ago

No flowbite-component give you direct access to className. If you want to customize it, you need to use the theme support.

export interface NavbarComponentProps extends Omit<PropsWithChildren<ComponentProps<'nav'>>, 'className'> {

This will not allow you to use the className property. Use: https://flowbite-react.com/theme

SerGem811 commented 2 years ago

If then why you have className there? It has property className

rluders commented 2 years ago

Oh, oh. I now get it. The property wasn't removed from the interface.