import { useState } from 'react'; import { usePlaygroundTools } from '@flowgram.ai/fixed-layout-editor'; import { Divider, Dropdown, Menu } from 'antd'; import { SelectZoom } from './styles'; export const ZoomSelect = () => { const tools = usePlaygroundTools({ maxZoom: 2, minZoom: 0.25 }); const [dropDownVisible, openDropDown] = useState(false); return ( openDropDown(false)} dropdownRender={() => ( tools.zoomin()}>Zoomin tools.zoomout()}>Zoomout tools.updateZoom(0.5)}>50% tools.updateZoom(1)}>100% tools.updateZoom(1.5)}>150% tools.updateZoom(2.0)}>200% )} > openDropDown(true)}>{Math.floor(tools.zoom * 100)}% ); };