summaryrefslogtreecommitdiff
path: root/components/Tweaks/BehaviorPanel.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'components/Tweaks/BehaviorPanel.tsx')
-rw-r--r--components/Tweaks/BehaviorPanel.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/components/Tweaks/BehaviorPanel.tsx b/components/Tweaks/BehaviorPanel.tsx
index 8edb986..5d61730 100644
--- a/components/Tweaks/BehaviorPanel.tsx
+++ b/components/Tweaks/BehaviorPanel.tsx
@@ -10,6 +10,8 @@ import {
StackDivider,
VStack,
Text,
+ Box,
+ Switch,
} from '@chakra-ui/react'
import React from 'react'
import { initialBehavior, initialMouse } from '../config'
@@ -34,6 +36,26 @@ export const BehaviorPanel = (props: BehaviorPanelProps) => {
color="gray.800"
>
<Flex alignItems="center" justifyContent="space-between">
+ <Text>Preview node</Text>
+ <Menu isLazy placement="right">
+ <MenuButton as={Button} rightIcon={<ChevronDownIcon />} colorScheme="" color="black">
+ <Text>
+ {mouse.preview ? mouse.preview[0]!.toUpperCase() + mouse.preview!.slice(1) : 'Never'}
+ </Text>
+ </MenuButton>
+ <Portal>
+ {' '}
+ <MenuList bgColor="gray.200" zIndex="popover">
+ <MenuItem onClick={() => setMouse({ ...mouse, preview: '' })}>Never</MenuItem>
+ <MenuItem onClick={() => setMouse({ ...mouse, preview: 'click' })}>Click</MenuItem>
+ <MenuItem onClick={() => setMouse({ ...mouse, preview: 'double' })}>
+ Double Click
+ </MenuItem>
+ </MenuList>
+ </Portal>
+ </Menu>
+ </Flex>
+ <Flex alignItems="center" justifyContent="space-between">
<Flex>
<Text>Expand Node</Text>
<InfoTooltip infoText="View only the node and its direct neighbors" />