diff --git a/src/assets/PlanningTool.css b/src/assets/PlanningTool.css index 5255075..a5389e0 100644 --- a/src/assets/PlanningTool.css +++ b/src/assets/PlanningTool.css @@ -9,18 +9,6 @@ width: calc(100% - 30rem); } -.task_card { - background: #0000aa; -} - -.scheduled_wo { - background: #00aa00; -} - -.maintenance_wo { - background: #aa0000; -} - .rct-sidebar { position: relative; padding-right: 0.25rem; @@ -58,26 +46,19 @@ margin-bottom: 1.25rem; } -.explanatory-notes .note .color { - display: inline-block; +.explanatory-notes .note { + display: flex; + align-items: center; + padding-top: .5rem; +} + +.explanatory-notes .note .legend-color { background-color: #000; width: 1.5rem; height: 0.8rem; margin-right: 1.3rem; } -.explanatory-notes .note .color.scheduled-wo { - background-color: #aa0000; -} - -.explanatory-notes .note .color.task-card { - background-color: #00aa00; -} - -.explanatory-notes .note .color.maintenance-wo { - background-color: #0000aa; -} - .static-item:after { content: ''; display: block; diff --git a/src/components/Legend.jsx b/src/components/Legend.jsx new file mode 100644 index 0000000..b910bc5 --- /dev/null +++ b/src/components/Legend.jsx @@ -0,0 +1,38 @@ +import React from "react"; +import Constants from "../constants/Constants"; + +const Legend = ({ title, legendItems }) => { + let defaultItems = Constants.DEFAULT_LEGEND_ITEMS; + + return ( +