Skip to content

Commit

Permalink
feat(components): add FormMegaLayout className (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
changfuguo committed Jul 3, 2020
1 parent 236c781 commit 7a2ad9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/antd/src/components/FormMegaLayout/index.tsx
Expand Up @@ -69,7 +69,7 @@ const StyledLayoutNestWrapper = styled(props => {
})`${props => computeStyle(props, true)}`

const MegaLayout = (props: ILayoutProps) => {
const { children, addonBefore, addonAfter, description, ...others } = props
const { children, addonBefore, addonAfter, description, className: megaLayoutClassName, ...others } = props
const layoutProps = props.layoutProps || {}
const { size } = useDeepFormItem()

Expand Down Expand Up @@ -119,9 +119,8 @@ const MegaLayout = (props: ILayoutProps) => {
if (labelWidth !== -1) itemProps.labelWidth = labelWidth
if (wrapperWidth !== -1) itemProps.wrapperWidth = wrapperWidth
}

let ele = <StyledLayoutWrapper
className="mega-layout-container"
className={classnames("mega-layout-container", megaLayoutClassName || '')}
label={label}
required={required}
help={description}
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/components/FormMegaLayout/index.tsx
Expand Up @@ -69,7 +69,7 @@ return <div style={style} className={classnames('mega-layout-nest-container', cl
})`${props => computeStyle(props)}`

const MegaLayout = (props: ILayoutProps) => {
const { children, addonBefore, addonAfter, description, ...others } = props
const { children, addonBefore, addonAfter, description, className: megaLayoutClassName, ...others } = props
const layoutProps = props.layoutProps || {}
const { size } = useDeepFormItem()

Expand Down Expand Up @@ -122,7 +122,7 @@ const MegaLayout = (props: ILayoutProps) => {
}

let ele = <StyledLayoutWrapper
className="mega-layout-container"
className={classnames("mega-layout-container", megaLayoutClassName || '')}
label={label}
required={required}
help={description}
Expand Down

0 comments on commit 7a2ad9e

Please sign in to comment.