ianstormtaylor / react-values

A set of tiny React components for handling state with render props.
https://git.io/react-values
MIT License
1.02k stars 39 forks source link

Looking for mechanism to style based on `disabled` prop #18

Closed Prestaul closed 6 years ago

Prestaul commented 6 years ago

What would be the correct way to style a component based on whether a react-values hoc had the disabled property set? It really looks like you can only access the value but maybe there's nothing wrong with leveraging closure to get at whichever variable is used to set disabled?

ianstormtaylor commented 6 years ago

@Prestaul that's a good point, I think disabled should probably be passed along to children so they can render off of it too!

ianstormtaylor commented 6 years ago

Released in 0.2.1!