diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-29 18:25:08 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-29 18:25:08 +0200 |
commit | e61f1e124f052e2317385b48f0b474175f685378 (patch) | |
tree | a62b3d26ba740a4e036ca809a3e125c0e594043e /components | |
parent | 22f6ecfc21b3899a832e1c24b8c40f41f09e9d25 (diff) |
emacsnode for mlord
Diffstat (limited to 'components')
-rw-r--r-- | components/config.ts | 1 | ||||
-rw-r--r-- | components/tweaks.tsx | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/components/config.ts b/components/config.ts index 9c49068..d538941 100644 --- a/components/config.ts +++ b/components/config.ts @@ -89,6 +89,7 @@ export const initialVisuals = { nodeHighlight: '', linkHighlight: '', backgroundColor: 'white', + emacsNodeColor: '', } export const initialBehavior = { diff --git a/components/tweaks.tsx b/components/tweaks.tsx index a30ce4c..e9ab582 100644 --- a/components/tweaks.tsx +++ b/components/tweaks.tsx @@ -679,6 +679,57 @@ export const Tweaks = (props: TweakProps) => { </MenuList> </Menu> </Flex> + <Flex alignItems="center" justifyContent="space-between"> + <Text>Emacs Node</Text> + <Menu isLazy> + <MenuButton + as={Button} + colorScheme="" + color="black" + rightIcon={<ChevronDownIcon />} + > + { + <Box + bgColor={visuals.emacsNodeColor + '.500'} + borderRadius="sm" + height={6} + width={6} + ></Box> + } + </MenuButton> + <MenuList bgColor="gray.200" width={50}> + <MenuItem + key={'none'} + onClick={() => setVisuals({ ...visuals, emacsNodeColor: '' })} + justifyContent="space-between" + alignItems="center" + display="flex" + > + <Text>No change</Text> + <Box borderRadius="sm" height={6} width={6}></Box> + </MenuItem> + {colorList.map((color) => ( + <MenuItem + key={color} + onClick={() => + setVisuals({ ...visuals, emacsNodeColor: color }) + } + justifyContent="space-between" + alignItems="center" + display="flex" + > + <Text>{color[0]!.toUpperCase() + color!.slice(1)}</Text> + <Box + bgColor={color + '.500'} + borderRadius="sm" + height={6} + width={6} + ></Box> + </MenuItem> + ))} + </MenuList> + </Menu> + </Flex> </Box> </VStack> </AccordionPanel> |