import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { IconProp } from "@fortawesome/fontawesome-svg-core"; type Props = { onClick: Function; icon?: IconProp; label: string; loading: boolean; className?: string; }; export default function SubmitButton({ onClick, icon, label, loading, className, }: Props) { return (
{ if (!loading) onClick(); }} > {icon && }

{label}

); }