import type { BaseElementProps } from './types'; import { Button as AntButton } from 'antd'; import type { BaseButtonProps } from 'antd/lib/button/button'; import type { FC } from 'react'; import { useThrottledCallback } from 'use-debounce'; type ElementProps = { action: () => void; text: string; }; type ButtonProps = BaseButtonProps & Pick; function Button({ status, action, text, ...props }: BaseElementProps & ElementProps) { const throttledAction = useThrottledCallback(action, 1_200, { trailing: false, }); return ( {text} ); } export default Button as FC;