diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-08 10:27:00 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:59 +0200 |
| commit | fc9c52a8f102202bd0e1a8a9dc4d8d68babe2304 (patch) | |
| tree | 0025827d791a3eeb5416bb89d4c36e777feabdd7 /src/components/sidebars/topology/machine/UnitListComponent.js | |
| parent | 1b5d2658f9ec06308b2a5ed062f6f5b4798ed733 (diff) | |
Implement UI for unit addition and removal
Diffstat (limited to 'src/components/sidebars/topology/machine/UnitListComponent.js')
| -rw-r--r-- | src/components/sidebars/topology/machine/UnitListComponent.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/sidebars/topology/machine/UnitListComponent.js b/src/components/sidebars/topology/machine/UnitListComponent.js new file mode 100644 index 00000000..288d1428 --- /dev/null +++ b/src/components/sidebars/topology/machine/UnitListComponent.js @@ -0,0 +1,17 @@ +import React from "react"; +import UnitContainer from "../../../../containers/sidebars/topology/machine/UnitContainer"; + +const UnitListComponent = ({unitType, unitIds}) => ( + <ul className="list-group mt-1"> + {unitIds.length !== 0 ? + unitIds.map((unitId, index) => ( + <UnitContainer unitType={unitType} unitId={unitId} index={index} key={index}/> + )) : + <div className="alert alert-info"> + <strong>No units...</strong> Add some with the menu above! + </div> + } + </ul> +); + +export default UnitListComponent; |
