mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 23:29:57 +08:00
Properly disable buttons
This commit is contained in:
@ -28,8 +28,7 @@ export default class Button extends Component {
|
|||||||
const iconName = extract(attrs, 'icon');
|
const iconName = extract(attrs, 'icon');
|
||||||
if (iconName) attrs.className += ' hasIcon';
|
if (iconName) attrs.className += ' hasIcon';
|
||||||
|
|
||||||
const disabled = extract(attrs, 'disabled');
|
if (attrs.disabled) {
|
||||||
if (disabled) {
|
|
||||||
attrs.className += ' disabled';
|
attrs.className += ' disabled';
|
||||||
delete attrs.onclick;
|
delete attrs.onclick;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user