Properly disable buttons

This commit is contained in:
Toby Zerner 2015-07-28 17:19:00 +09:30
parent 97334bea12
commit ff6f2ebf82

View File

@ -28,8 +28,7 @@ export default class Button extends Component {
const iconName = extract(attrs, 'icon');
if (iconName) attrs.className += ' hasIcon';
const disabled = extract(attrs, 'disabled');
if (disabled) {
if (attrs.disabled) {
attrs.className += ' disabled';
delete attrs.onclick;
}