Automattic / dops-components

Shared Calypso-style components for non-Calypso projects.
GNU General Public License v2.0
9 stars 6 forks source link

FormToggle, SelectDropdown: if it's disabled, disable click events. #82

Closed eliorivero closed 7 years ago

eliorivero commented 7 years ago

FormToggle

For this component this PR seeks to resolve an issue where the disabled property works for keys but not for click events. Before this PR, if you pass disabled as property, the toggle is visually "disabled" but in reality you can still click the element.

SelectDropdown

In this component the disabled state didn't existed. It has now been implemented and it looks like a disabled TextInput.

captura de pantalla 2017-01-27 a las 21 48 06
zinigor commented 7 years ago

Code-wise looks good!