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=7a5a7f54f0b2e97ca0d9e04e7fd6c0b0ac81f6fe;hpb=e29efc315df33d546237e270470916e26df391d6;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 7a5a7f54f..65b90fdfc 100644 --- a/skyquake/plugins/composer/src/src/components/Button.js +++ b/skyquake/plugins/composer/src/src/components/Button.js @@ -1,6 +1,6 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,6 +40,7 @@ const Button = React.createClass({ label: null, title: null, src: null, + disabled: false, onClick: () => {} }; }, @@ -57,10 +58,17 @@ 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 ( -