import { FormState } from '@/hooks/useFormState' import { Button } from '@stacklok/ui-kit' import { FlipBackward } from '@untitled-ui/icons-react' type Props = { canSubmit: boolean formErrorMessage?: string formSideNote?: string formState: FormState children?: React.ReactNode isPending: boolean } export function FormButtons({ formErrorMessage, formState, canSubmit, isPending, children, formSideNote, }: Props) { return (
{formSideNote &&
{formSideNote}
} {formErrorMessage && (
{formErrorMessage}
)} {formState.isDirty && ( )} {children}
) }