import { ChevronDownIcon } from '@chakra-ui/icons' import { Box, Button, Collapse, Flex, Menu, MenuButton, MenuItem, MenuList, Portal, StackDivider, VStack, Text, } from '@chakra-ui/react' import React from 'react' import { ColorMenu } from './ColorMenu' import { colorList, initialVisuals } from '../../config' import { SliderWithInfo } from '../SliderWithInfo' export interface LabelsPanelProps { visuals: typeof initialVisuals setVisuals: any } export const LabelsPanel = (props: LabelsPanelProps) => { const { visuals, setVisuals } = props return ( } align="stretch" color="gray.800" > Show labels }> {!visuals.labels ? 'Never' : visuals.labels < 2 ? 'On Highlight' : 'Always'} {' '} setVisuals({ ...visuals, labels: 0 })}>Never setVisuals({ ...visuals, labels: 1 })}> On Highlight setVisuals({ ...visuals, labels: 2 })}>Always setVisuals({ ...visuals, labels: 3 })}> Always (even in 3D) 1} animateOpacity> setVisuals({ ...visuals, labelScale: value / 2 })} /> setVisuals((curr: typeof initialVisuals) => ({ ...curr, labelDynamicStrength: value, })) } /> 0}> setVisuals((curr: typeof initialVisuals) => ({ ...curr, labelDynamicDegree: value, })) } /> { console.log(visuals.labelBackgroundOpacity) setVisuals({ ...visuals, labelBackgroundOpacity: value }) }} min={0} max={1} step={0.01} /> setVisuals({ ...visuals, labelFontSize: value })} /> setVisuals({ ...visuals, labelLength: value })} /> setVisuals({ ...visuals, labelWordWrap: value })} /> setVisuals({ ...visuals, labelLineSpace: value })} /> ) }