import { MouseEventHandler } from "react"; export const IconButton: React.FC<{ onClick: () => void; disabled?: boolean; color?: string; children: any; }> = ({ onClick, disabled, color, children }) => { const onClickStopPropagation: MouseEventHandler = (e) => { e.stopPropagation(); if (disabled) { return; } onClick(); }; const colorClassName = color ? `text-${color}` : ""; return ( {children} ); };