import * as DropdownMenu from '@radix-ui/react-dropdown-menu' import { breakpoints, IconButton } from 'components/shared' import Tooltip from 'components/tooltip' import { memo } from 'react' import state, { useSelector } from 'state' import { DashStyle } from 'types' import { DropdownContent, Item, DashDottedIcon, DashSolidIcon, DashDashedIcon, } from '../shared' const dashes = { [DashStyle.Solid]: , [DashStyle.Dashed]: , [DashStyle.Dotted]: , } function changeDashStyle( e: Event & { currentTarget: { value: DashStyle } } ): void { state.send('CHANGED_STYLE', { dash: e.currentTarget.value }) } function QuickdashSelect(): JSX.Element { const dash = useSelector((s) => s.values.selectedStyle.dash) return ( {dashes[dash]} {Object.keys(DashStyle).map((dashStyle: DashStyle) => ( {dashes[dashStyle]} ))} ) } export default memo(QuickdashSelect)