diff options
| author | Georgios Andreadis <G.Andreadis@student.tudelft.nl> | 2017-11-08 10:47:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-08 10:47:37 +0100 |
| commit | aef3e697f02806a47dec3843a071f8b5cd9980bc (patch) | |
| tree | 114400610f6d9708f774ac8af8954588bbf50fb3 /src/components/app/sidebars/topology/room/RackConstructionComponent.js | |
| parent | 2f71cb1c9fd3e649a1f0e6f713922a73372f064e (diff) | |
| parent | 1f4616cbf9c82e4976d1f4b4c018d5e9ff83ad10 (diff) | |
Merge pull request #55 from atlarge-research/feature/24/room-edit
Implement room editing
Diffstat (limited to 'src/components/app/sidebars/topology/room/RackConstructionComponent.js')
| -rw-r--r-- | src/components/app/sidebars/topology/room/RackConstructionComponent.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/components/app/sidebars/topology/room/RackConstructionComponent.js b/src/components/app/sidebars/topology/room/RackConstructionComponent.js index 0982e403..06b8a2aa 100644 --- a/src/components/app/sidebars/topology/room/RackConstructionComponent.js +++ b/src/components/app/sidebars/topology/room/RackConstructionComponent.js @@ -1,9 +1,11 @@ +import classNames from "classnames"; import React from "react"; const RackConstructionComponent = ({ - inRackConstructionMode, onStart, - onStop + onStop, + inRackConstructionMode, + isEditingRoom }) => { if (inRackConstructionMode) { return ( @@ -15,7 +17,12 @@ const RackConstructionComponent = ({ } return ( - <div className="btn btn-primary btn-block" onClick={onStart}> + <div + className={classNames("btn btn-outline-primary btn-block", { + disabled: isEditingRoom + })} + onClick={() => (isEditingRoom ? undefined : onStart())} + > <span className="fa fa-plus mr-2" /> Start rack construction </div> |
