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