Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seyeo opened this issue May 10, 2023 · 3 comments · Fixed by #741
Closed
Labels
🐛 bug Something isn't working confirmed This bug was confirmed help wanted Extra attention is needed

Comments

@seyeo
Copy link

seyeo commented May 10, 2023

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.

@IuriPires
Copy link
Contributor

@seyeo sorry, I deleted my previous comments because I forgot to test the build. And yes, it's breaking when we try to build it.

@rluders rluders added 🐛 bug Something isn't working confirmed This bug was confirmed labels May 13, 2023
@rluders
Copy link
Collaborator

rluders commented May 13, 2023

I could also reproduce it.

@IuriPires
Copy link
Contributor

@seyeo I opened a PR related to your issue. PR 741. Just waiting it to be reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working confirmed This bug was confirmed help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants