import clsx from 'clsx'; import { useState } from 'react'; import { Checkbox } from '@@/form-components/Checkbox'; import styles from './TableSettingsMenuAutoRefresh.module.css'; interface Props { onChange(value: number): void; value: number; } export function TableSettingsMenuAutoRefresh({ onChange, value }: Props) { const [isCheckVisible, setIsCheckVisible] = useState(false); const isEnabled = value > 0; return ( <> onChange(e.target.checked ? 10 : 0)} /> {isEnabled && (
setIsCheckVisible(false)} >