Skip to content

Flowbite theme ThemeProps dark attribute does not change if false #581

@haron68

Description

@haron68

Describe the bug
When using Flowbite component to create custom theme it does not accept dark: false. All rendered components use dark theme

To Reproduce
Steps to reproduce the behavior:

  1. Go to root component either index.ts or App.tsx
  2. Use <Flowbite> custom theme component and wrap it around the app container. Set dark: false in ThemeProps
<Flowbite theme={{
    dark: false
  }}>
    <App {...props} />
</Flowbite>
  1. Go to inspect tools on browser
  2. See that <html class="dark"> and all Flowbite components when used within the app render in dark mode

Expected behavior
Flowbite components should render in light mode

System information:

  • Device: 2020 Macbook Pro M1
  • Resolution: 13.3-inch (2560 × 1600)
  • OS: macOS Ventura 13.0.1
  • Browser: Brave/Chrome

Project information:

  • Tailwind: ^3.1.6
  • Flowbite: ^1.5.5
  • Flowbite React: ^0.3.7
  • Type: CRA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions