From 9b9f052f53f38e90ff39d9ad242a8e73c31102b4 Mon Sep 17 00:00:00 2001 From: quirkyvar Date: Sun, 12 Jul 2020 17:47:47 +0800 Subject: [PATCH] fix(layout): type typo (#962) * fix: type typo * feat: update types --- packages/antd/src/components/FormMegaLayout/index.tsx | 3 ++- packages/next/src/components/FormMegaLayout/index.tsx | 2 +- packages/react/src/types.ts | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/antd/src/components/FormMegaLayout/index.tsx b/packages/antd/src/components/FormMegaLayout/index.tsx index e5324c4bbcd..4cc66108685 100644 --- a/packages/antd/src/components/FormMegaLayout/index.tsx +++ b/packages/antd/src/components/FormMegaLayout/index.tsx @@ -68,6 +68,7 @@ const StyledLayoutNestWrapper = styled(props => { return
{children}
})`${props => computeStyle(props, true)}` + const MegaLayout = (props: ILayoutProps) => { const { children, addonBefore, addonAfter, description, className: megaLayoutClassName, ...others } = props const layoutProps = props.layoutProps || {} @@ -215,7 +216,7 @@ const MegaLayoutItem = (props) => { }) } -const FormMegaLayout = createVirtualBox('mega-layout', MegaLayout) +const FormMegaLayout = createVirtualBox & { children: React.ReactNode }>('mega-layout', MegaLayout) export { MegaLayout, diff --git a/packages/next/src/components/FormMegaLayout/index.tsx b/packages/next/src/components/FormMegaLayout/index.tsx index 6cd7c148dbc..26f1e904e22 100644 --- a/packages/next/src/components/FormMegaLayout/index.tsx +++ b/packages/next/src/components/FormMegaLayout/index.tsx @@ -215,7 +215,7 @@ const MegaLayoutItem = (props) => { }) } -const FormMegaLayout = createVirtualBox('mega-layout', MegaLayout) +const FormMegaLayout = createVirtualBox & { children: React.ReactNode }>('mega-layout', MegaLayout) export { MegaLayout, diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 8e14f718d68..3165307f979 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -23,6 +23,8 @@ export interface ILayoutProps { defaultSettings?: any children?: (props: ILayoutProps) => React.ReactElement full?: boolean + layoutProps?: any + className?: string label?: any required?: boolean labelAlign?: ILayoutLabelAlign