X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fcomponents%2FButton.js;h=65b90fdfc626b7a547b3fffc0a2db5e6d7a0f4f1;hp=76a569f860b1b3585bd54316efcf83e706fb4639;hb=28412d0042632687d765d239cbb3ff0523a131b9;hpb=b06607173b5bafa999594cdc1e60a825f578e8e6 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 ( -
+
{ src ? : null } {label}