diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-28 09:47:06 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:46 +0200 |
| commit | b17f1d8cb4815f57a4b7043cc91b867ec3cbc867 (patch) | |
| tree | 4dfdc2a315b5a6df5a61d862c946542355bcd5d9 /src/components/sidebars/TopologySidebarComponent.js | |
| parent | 378059f684ea27f8bf4302dae0a8977a260807f4 (diff) | |
Add conditional topology sidebar
Diffstat (limited to 'src/components/sidebars/TopologySidebarComponent.js')
| -rw-r--r-- | src/components/sidebars/TopologySidebarComponent.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/sidebars/TopologySidebarComponent.js b/src/components/sidebars/TopologySidebarComponent.js new file mode 100644 index 00000000..371463d1 --- /dev/null +++ b/src/components/sidebars/TopologySidebarComponent.js @@ -0,0 +1,27 @@ +import React from "react"; +import BuildingSidebarContent from "./BuildingSidebarContent"; +import Sidebar from "./Sidebar"; + +const TopologySidebarComponent = ({interactionLevel}) => { + let sidebarHeading; + let sidebarContent; + + switch (interactionLevel.mode) { + case "BUILDING": + sidebarHeading = "Building"; + sidebarContent = <BuildingSidebarContent/>; + break; + default: + sidebarHeading = "Error"; + sidebarContent = "Missing Content"; + } + + return ( + <Sidebar isRight={true}> + <h3>{sidebarHeading}</h3> + {sidebarContent} + </Sidebar> + ); +}; + +export default TopologySidebarComponent; |
