diff --git a/packages/console/src/components/DetailsForm/index.tsx b/packages/console/src/components/DetailsForm/index.tsx index f12bedb4d..545d42feb 100644 --- a/packages/console/src/components/DetailsForm/index.tsx +++ b/packages/console/src/components/DetailsForm/index.tsx @@ -1,26 +1,25 @@ import { forwardRef } from 'react'; -import type { ForwardedRef, HTMLProps, ReactNode } from 'react'; +import type { ReactNode } from 'react'; import SubmitFormChangesActionBar from '../SubmitFormChangesActionBar'; import * as styles from './index.module.scss'; -type Props = HTMLProps & { +type Props = { isDirty: boolean; isSubmitting: boolean; children: ReactNode; + onSubmit: () => Promise; onDiscard: () => void; }; -const DetailsForm = ( - { isDirty, isSubmitting, onDiscard, children, ...rest }: Props, - reference: ForwardedRef -) => { +const DetailsForm = ({ isDirty, isSubmitting, onSubmit, onDiscard, children }: Props) => { return ( -
+
{children}
diff --git a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx index f7a1bb495..8f7b9094d 100644 --- a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx +++ b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx @@ -4,10 +4,11 @@ import * as styles from './index.module.scss'; type Props = { isOpen: boolean; isSubmitting: boolean; + onSubmit: () => Promise; onDiscard: () => void; }; -const SubmitFormChangesActionBar = ({ isOpen, isSubmitting, onDiscard }: Props) => { +const SubmitFormChangesActionBar = ({ isOpen, isSubmitting, onSubmit, onDiscard }: Props) => { if (!isOpen) { return null; } @@ -24,10 +25,10 @@ const SubmitFormChangesActionBar = ({ isOpen, isSubmitting, onDiscard }: Props) />