-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
@@ -49,6 +49,7 @@ class TwoSquares extends React.Component { | |||
<div> | |||
<div key="one" style={[squareStyles.both, squareStyles.one]} /> | |||
<div key="two" style={[squareStyles.both, squareStyles.two]} /> | |||
<div key="three" disabled style={[squareStyles.both, squareStyles.three]} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On line 177 and here, let's call that style all
instead of both
since there are three now.
Looking good. I just had a few style-related comments. |
Thanks @jooyunghan + @jmcriffey! |
I have a custom "disable handling" where I set e.g. opacity 0.5 on a component (and disable interactions) and Radium doesn't handle this - a component stays on the :hover state if it's been made active and then disabled, until you roll over it again (so it seems like e.g. lots of components are "selected" when lots are actually just stuck). Is there a workaround/fix for this? Edit: a fix I've just found is to pass in a "key" prop with any important values that might change (i.e. my "enable button" var), causing a re-render when anything changes. This does mess up any animations though so not ideal. |
Disabled elements will not react to interactions (hover/active/focus) and follow the
:disabled
pseudo-class style.<input disabled style={{':hover': ..., ':disabled': ...}}>