diff --git a/framework/core/js/lib/components/action-button.js b/framework/core/js/lib/components/action-button.js index 505d600cb..6971ddc92 100644 --- a/framework/core/js/lib/components/action-button.js +++ b/framework/core/js/lib/components/action-button.js @@ -12,6 +12,12 @@ export default class ActionButton extends Component { var label = attrs.label; delete attrs.label; + if (attrs.disabled) { + attrs.className = (attrs.className || '')+' disabled'; + delete attrs.onclick; + delete attrs.disabled; + } + attrs.href = attrs.href || 'javascript:;'; return m('a'+(iconName ? '.has-icon' : ''), attrs, [ iconName ? icon(iconName+' icon') : '', diff --git a/framework/core/less/lib/alerts.less b/framework/core/less/lib/alerts.less index 78da2b2b2..e97169b3f 100644 --- a/framework/core/less/lib/alerts.less +++ b/framework/core/less/lib/alerts.less @@ -38,6 +38,12 @@ text-transform: uppercase; font-size: 12px; font-weight: bold; + + &.disabled { + cursor: default; + text-decoration: none; + opacity: 0.5; + } } & .btn { margin: -10px;