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

Use native HTML attribute names instead of isX or hasX to avoid confusion #166

Closed
fabien-ml opened this issue Apr 1, 2023 · 1 comment
Closed

Comments

@fabien-ml
Copy link
Collaborator

Describe the bug
Some components has both isDisabled and disabled props which is a bit confusing. It would be cleaner to expose just one.

Expected behavior
Expose only one prop when equivalent exist as HTML attribute (disabled, required, readOnly, etc...).

@jcmonnin
Copy link

jcmonnin commented Apr 2, 2023

Similar issue for Checkbox: onCheckedChange vs onChange.

For the Kobalte checkbox, onChange is not reported, so my Checkbox migrated from Hope-UI didn't work before switching to onCheckedChange. It would be better if TypeScript would catch it.

Reporting them on a case-by-case basis as they appear.

@fabien-ml fabien-ml changed the title Omit redundant HTML props to avoid confusion Use native HTML attribute names instead of isX or hasX to avoid confusion Apr 2, 2023
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

No branches or pull requests

2 participants