Skip to content

ToggleSwitch color: Type 'string' is not assignable to type 'string & FlowbiteColors'. #736

@seyeo

Description

@seyeo

Describe the bug
ToggleSwitch color prop does not accept a string (Typescript)

To Reproduce
Steps to reproduce the behavior:

  <ToggleSwitch
                    color={'blue'}
                    checked={true}
                    label="Test" 
                />

Expected behavior
When compiling for production, it breaks and you get the error "Type 'string' is not assignable to type 'string & FlowbiteColors'."

Screenshots
If applicable, add screenshots to help explain your problem.

System information:

  • Device:
  • Resolution:
  • OS:
  • Browser:
  • Version:

Project information:

  • Tailwind: 3.2.4
  • Flowbite: 1.6.3
  • Flowbite React: 0.3.8
  • Type: CRA

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't workingconfirmedThis bug was confirmedhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions