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

[Feature]: <Switch/> #682

Closed
christopherkindl opened this issue Sep 16, 2023 · 12 comments · Fixed by #761 or #767
Closed

[Feature]: <Switch/> #682

christopherkindl opened this issue Sep 16, 2023 · 12 comments · Fixed by #761 or #767
Assignees
Labels
Good first issue Beginner-friendly issue for first-time contributors

Comments

@christopherkindl
Copy link
Member

What problem does this feature solve?

has been requested by a lot of users. Tremor team is also reworking their entire block section where they find a need for this component.

What does the proposed API look like?

Please use headless' switch for the underlying logic. See styling in the image below.

Explicit props:

  • checked?: (value: string) => void;
  • onChange?: (value: string) => void;
  • color?: string // only for isChecked color
  • id?: string
  • name?: string
  • error?: boolean
  • errorMessage?: string
  • disabled?: string

_gh_switch

@christopherkindl christopherkindl added the Good first issue Beginner-friendly issue for first-time contributors label Sep 16, 2023
@mrkirthi-24
Copy link

Hi @christopherkindl, I would like to work on this issue

@christopherkindl
Copy link
Member Author

Hi @mrkirthi-24, awesome, thank you! We just assigned you 🙂

@nicolasVenard
Copy link

Hey, I would also like to work on this issue, is that possible? Or do I have to find another one that's not assigned? 🙂

@mrkirthi-24
Copy link

@nicolasVenard I am working on this.

@christopherkindl
Copy link
Member Author

christopherkindl commented Oct 14, 2023

@mrkirthi-24 just wanted to check-in whether you still want to tackle this? Otherwise happy to re-assign :)

@mrkirthi-24
Copy link

I apologize for the delay. I am working on it.

@christopherkindl
Copy link
Member Author

Awesome, thank you! :)

@mrkirthi-24
Copy link

Hi @christopherkindl, I think disabled should be boolean?
And what should i do if explicit props "checked and onChange" are same as headless ui switch default props ? Should i change it??

@mrkirthi-24 mrkirthi-24 removed their assignment Oct 15, 2023
@mrkirthi-24
Copy link

I am sorry but I cannot solve it

@mbauchet
Copy link
Collaborator

@AlexRousseau92

@AlexRousseau92
Copy link

Hello, i would like to work on this issue :)

@github-actions
Copy link

🎉 This issue has been resolved in version 3.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Beginner-friendly issue for first-time contributors
Projects
None yet
6 participants