X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fcomponents%2FButton.js;h=65b90fdfc626b7a547b3fffc0a2db5e6d7a0f4f1;hb=34bed49e59fe06cfbc29b5fa8b2eb2ebb21a2173;hp=76a569f860b1b3585bd54316efcf83e706fb4639;hpb=4e7b00465d087292dc6127bc892a5fa3a64365b6;p=osm%2FUI.git diff --git a/skyquake/plugins/composer/src/src/components/Button.js b/skyquake/plugins/composer/src/src/components/Button.js index 76a569f86..65b90fdfc 100644 --- a/skyquake/plugins/composer/src/src/components/Button.js +++ b/skyquake/plugins/composer/src/src/components/Button.js @@ -40,6 +40,7 @@ const Button = React.createClass({ label: null, title: null, src: null, + disabled: false, onClick: () => {} }; }, @@ -57,8 +58,15 @@ const Button = React.createClass({ const title = this.props.title; const draggable = this.props.draggable; const className = ClassNames(this.props.className, 'Button'); + let style = { + } + if(this.props.disabled) { + style.pointerEvents = 'none'; + style.cursor = 'not-allowed'; + style.opacity = 0.25; + } return ( -