import { Icon } from '@iconify/react'; import { FormikContextType } from 'formik'; import Button from '@/components/Button'; import { cn } from '@/lib/helper'; interface FormActionsProps { type: 'add' | 'edit' | 'detail'; formik: FormikContextType; editUrl?: string; onDelete?: () => void; disableSubmit?: boolean; } export const FormActions = ({ type, formik, editUrl, onDelete, disableSubmit = false, }: FormActionsProps) => { return (
{type !== 'add' && onDelete && (
{type !== 'edit' && editUrl && ( )}
)} {type !== 'detail' && (
)}
); };