Skip to content

Commit

Permalink
fix(layout): FormContainer wrong props (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris authored Apr 18, 2024
1 parent 80b609d commit 2a4d8db
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-turkeys-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/layout": patch
---

fix(layout): FormContainer wrong props
4 changes: 2 additions & 2 deletions packages/layout/src/FormPageLayout/FormContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from '@rocket.chat/fuselage';
import type { ReactElement, FC } from 'react';
import type { ComponentProps } from 'react';

const FormContainer: FC = ({ children }): ReactElement => <Box>{children}</Box>;
const FormContainer = (props: ComponentProps<typeof Box>) => <Box {...props} />;

export default FormContainer;
28 changes: 28 additions & 0 deletions packages/layout/src/FormPageLayout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,38 @@ import FormSubtitle from './FormSubtitle';
import FormTitle from './FormTitle';

export default Object.assign(Form, {
/**
* @deprecated prefer using named imports
* */
Header: FormHeader,
/**
* @deprecated prefer using named imports
* */
Steps: FormSteps,
/**
* @deprecated prefer using named imports
* */
Title: FormTitle,
/**
* @deprecated prefer using named imports
* */
Subtitle: FormSubtitle,
/**
* @deprecated prefer using named imports
* */
Container: FormContainer,
/**
* @deprecated prefer using named imports
* */
Footer: FormFooter,
});

export {
Form,
FormContainer,
FormHeader,
FormFooter,
FormSteps,
FormSubtitle,
FormTitle,
};

0 comments on commit 2a4d8db

Please sign in to comment.