Skip to content

Commit

Permalink
fix(layout): type typo (#962)
Browse files Browse the repository at this point in the history
* fix: type typo

* feat: update types
  • Loading branch information
JohnIsOnTheRoad authored Jul 12, 2020
1 parent 854feec commit 9b9f052
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/antd/src/components/FormMegaLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const StyledLayoutNestWrapper = styled(props => {
return <div style={style} className={classnames('mega-layout-nest-container', className)}>{children}</div>
})`${props => computeStyle(props, true)}`


const MegaLayout = (props: ILayoutProps) => {
const { children, addonBefore, addonAfter, description, className: megaLayoutClassName, ...others } = props
const layoutProps = props.layoutProps || {}
Expand Down Expand Up @@ -215,7 +216,7 @@ const MegaLayoutItem = (props) => {
})
}

const FormMegaLayout = createVirtualBox<ILayoutProps>('mega-layout', MegaLayout)
const FormMegaLayout = createVirtualBox<Omit<ILayoutProps, 'children'> & { children: React.ReactNode }>('mega-layout', MegaLayout)

export {
MegaLayout,
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/components/FormMegaLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const MegaLayoutItem = (props) => {
})
}

const FormMegaLayout = createVirtualBox<ILayoutProps>('mega-layout', MegaLayout)
const FormMegaLayout = createVirtualBox<Omit<ILayoutProps, 'children'> & { children: React.ReactNode }>('mega-layout', MegaLayout)

export {
MegaLayout,
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b9f052

Please sign in to comment.