import React, { useRef } from 'react'; import type { CSSProperties, FC, MouseEvent, PropsWithChildren } from 'react'; export type ButtonProps = PropsWithChildren<{ className?: string; disabled?: boolean; onClick?: (e: MouseEvent) => void; style?: CSSProperties; tabIndex?: number; icon?: string; }>; export const Button: FC = ({ children, onClick, className = '', tabIndex = 0, icon, ...rest }) => { const ref = useRef(null); function handleClick(event: MouseEvent) { onClick?.(event); setTimeout(() => { ref.current?.blur(); }, 300); } return ( ); };