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