22 lines
574 B
TypeScript
22 lines
574 B
TypeScript
'use client';
|
|
import { Buttons } from './Buttons';
|
|
import { FormContextProvider } from './context/form-context';
|
|
import { Elements } from './Elements';
|
|
import type { Props } from './types';
|
|
import { makeCreateUrl } from '@/utils/url';
|
|
import { Divider } from 'ui';
|
|
|
|
export function Form(props: Props) {
|
|
const { pageUrlParams } = props;
|
|
|
|
return (
|
|
<FormContextProvider pageUrlParams={pageUrlParams} createUrl={makeCreateUrl(pageUrlParams)}>
|
|
<Elements {...props} />
|
|
<Divider />
|
|
<Buttons />
|
|
</FormContextProvider>
|
|
);
|
|
}
|
|
|
|
export * from './Header';
|