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

Missing current value props? #103

Closed
FoundationKen opened this issue Nov 27, 2023 · 1 comment
Closed

Missing current value props? #103

FoundationKen opened this issue Nov 27, 2023 · 1 comment

Comments

@FoundationKen
Copy link

FoundationKen commented Nov 27, 2023

First, thanks for building this! Rewind is just the type of library I've been wanting to see built on top of Tailwind!

I have some confusion, though, using some components.

Many controls do not seem to have a way to set the current value. For example, Switch and Checkbox normally have a checked prop in other React libraries, while Select would usually have a value for the current value.

Are these just not implemented yet or is there some other way of dealing with this in Rewind?

Thanks.

@NickDunas
Copy link
Contributor

Hello @FoundationKen and thank you for your kind words!

When you are passing a prop on a component that does not exist on the defined component props, then that prop will be automatically added to the underlying element!

This means that for example if you are using the Input component and you want to pass the defaultValue prop then you can do it as you would do it for the input element!

Give it a try and let me know if it's more clear for you now :)

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