'use client'; import { FC, useCallback } from 'react'; import clsx from 'clsx'; export const Slider: FC<{ value: 'on' | 'off'; fill?: boolean; onChange: (value: 'on' | 'off') => void; }> = (props) => { const { value, onChange, fill } = props; const change = useCallback(() => { onChange(value === 'on' ? 'off' : 'on'); }, [value]); return (