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

feat(Radio/Checkbox/Toggle)!: handle color prop for form elements #323

Merged

Conversation

Haythamasalama
Copy link
Contributor

@Haythamasalama Haythamasalama commented Jun 20, 2023

Support color customization on Radio/Checkbox/Toggle

Resolves #313

@vercel
Copy link

vercel bot commented Jun 20, 2023

@Haythamasalama is attempting to deploy a commit to the Nuxt Labs Team on Vercel.

A member of the Team first needs to authorize it.

@nuxt-studio
Copy link

nuxt-studio bot commented Jun 20, 2023

Live Preview ready!

Name Edit Preview Latest Commit
ui Edit on Studio ↗︎ View Live Preview 972eece

@Haythamasalama
Copy link
Contributor Author

Haythamasalama commented Jun 20, 2023

@benjamincanac It would be nice to add color props for Icon, which I need a lot! What do you think?

Copy link
Member

Why would you need a color prop for an icon? You can just add text-primary-500 class for example. Other components may have this prop when some logic is required underneath.

@Haythamasalama
Copy link
Contributor Author

Why would you need a color prop for an icon? You can just add text-primary-500 class for example. Other components may have this prop when some logic is required underneath.

Yes, I know that, so I asked you before make it, but in general, It's nice to have color, size, and rounded in every component that makes it easy to edit theme and class `UI properties for other things.

In cases like using icons in dashboard analytics with different colors, it can be helpful.

Copy link
Member

It is kind of the same debate as #264

@benjamincanac benjamincanac changed the title feat: support color for form elements feat(Radio/Checkbox/Toggle): handle color prop for form elements Jun 20, 2023
@benjamincanac
Copy link
Member

I've updated your PR to improve the preset of the 3 components and support the safelist. Let me know what you think!

@benjamincanac benjamincanac changed the title feat(Radio/Checkbox/Toggle): handle color prop for form elements feat(Radio/Checkbox/Toggle)!: handle color prop for form elements Jun 20, 2023
@benjamincanac
Copy link
Member

For reference, I've also removed all the blur and focus event handling from the form elements as since the bind of $attrs it is useless.

@benjamincanac benjamincanac merged commit 03d7430 into nuxt:dev Jun 20, 2023
1 of 2 checks passed
@Haythamasalama Haythamasalama deleted the feat/support-color-for-form-elements branch June 20, 2023 15:37
benjamincanac added a commit that referenced this pull request Jun 21, 2023
…323)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
benjamincanac added a commit that referenced this pull request Jun 21, 2023
…323)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Radio/Checkbox/Toggle] Support color prop with safelist
2 participants