// @ts-nocheck import React from 'react'; import { Button, PopoverInteractionKind, Popover, Menu, MenuItem, MenuDivider, Classes, Tooltip, Position, } from '@blueprintjs/core'; import clsx from 'classnames'; import { Icon, T } from '@/components'; import Style from './style.module.scss'; /** * Dashboard rows height button control. */ export function DashboardRowsHeightButton({ initialValue, value, onChange }) { const [localSize, setLocalSize] = React.useState(initialValue); // Handle menu item click. const handleItemClick = (size) => (event) => { setLocalSize(size); onChange && onChange(size, event); }; // Button icon name. const btnIcon = `table-row-${localSize}`; return ( } /> } /> } /> } placement="bottom-start" modifiers={{ offset: { offset: '0, 4' }, }} interactionKind={PopoverInteractionKind.CLICK} > } minimal={true} position={Position.BOTTOM} >