diff --git a/web/src/components/ContextMenu.tsx b/web/src/components/ContextMenu.tsx index d62fa3d..abcefae 100644 --- a/web/src/components/ContextMenu.tsx +++ b/web/src/components/ContextMenu.tsx @@ -8,7 +8,9 @@ import { Portal, PopoverContent, PopoverBody, + Spacer, } from "@chakra-ui/react"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { debugData } from "../utils/debugData"; import { useState } from "react"; @@ -21,6 +23,7 @@ interface Options { [key: string]: { description?: string; metadata?: string[] | { [key: string]: any }; + subMenu?: boolean; }; } @@ -32,6 +35,7 @@ debugData([ options: { ["Dinka Blista"]: { description: "Super cool vehicle", + subMenu: true, metadata: { ["Plate"]: "KLT 192", ["Status"]: "In garage", @@ -112,16 +116,33 @@ const ContextMenu: React.FC = () => { key={`option-${index}`} > {/* TODO: react-markdown (?) */} - - - {option[0]} - - - {option[1].description && ( - - {option[1].description} + + + + + {option[0]} + + + {option[1].description && ( + + {option[1].description} + + )} - )} + {option[1].subMenu && ( + <> + + + + + + )} +