import { ArrowRightIcon, ChevronDownIcon, RepeatIcon } from '@chakra-ui/icons'
import {
Text,
Box,
Flex,
IconButton,
StackDivider,
Tooltip,
VStack,
MenuButton,
Menu,
Portal,
MenuList,
MenuOptionGroup,
MenuItemOption,
Button,
MenuItem,
} from '@chakra-ui/react'
import React from 'react'
import { ColorMenu } from './ColorMenu'
import { colorList, initialVisuals } from '../../config'
export interface ColorsPanelProps {
visuals: typeof initialVisuals
setVisualsCallback: any
highlightColor: string
setHighlightColor: any
}
export const ColorsPanel = (props: ColorsPanelProps) => {
const { visuals, setVisualsCallback, highlightColor, setHighlightColor } = props
return (
}
align="stretch"
color="gray.800"
>
Nodes
}
variant="ghost"
onClick={() => {
const arr = visuals.nodeColorScheme ?? []
setVisualsCallback({
...visuals,
//shuffle that guy
//definitely thought of this myself
nodeColorScheme: arr
.map((x: any) => [Math.random(), x])
.sort(([a], [b]) => a - b)
.map(([_, x]) => x),
})
}}
/>
}
size="sm"
variant="ghost"
onClick={() => {
const arr = visuals.nodeColorScheme ?? []
setVisualsCallback({
...visuals,
nodeColorScheme: [...arr.slice(1, arr.length), arr[0]],
})
}}
/>
Links
Accent
)
}