Skip to content

Commit

Permalink
fix(antd/next): fix FormTextBox doesnot support className (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang authored May 18, 2020
1 parent 4f87465 commit e40bdf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/antd-components/src/form-text-box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const FormTextBox = createControllerBox<IFormTextBox & ItemProps>(
'text-box',
styled(({ props, form, className, children }) => {
const schema = new Schema(props)
const mergeProps = schema.getExtendsComponentProps(false)
const mergeProps = schema.getExtendsComponentProps()
const { title, label, text, gutter, style } = Object.assign(
{
gutter: 5
Expand Down Expand Up @@ -84,7 +84,7 @@ export const FormTextBox = createControllerBox<IFormTextBox & ItemProps>(

const textChildren = (
<div
className={className}
className={`${className} ${mergeProps.className}`}
style={{
marginRight: -gutter / 2,
marginLeft: -gutter / 2
Expand Down
4 changes: 2 additions & 2 deletions packages/next-components/src/form-text-box/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const FormTextBox = createControllerBox<IFormTextBox & ItemProps>(

const textChildren = (
<div
className={className}
className={`${className} ${mergeProps.className}`}
style={{
marginRight: -gutter / 2,
marginLeft: -gutter / 2
Expand All @@ -92,7 +92,7 @@ export const FormTextBox = createControllerBox<IFormTextBox & ItemProps>(
)

if (!title && !label) return textChildren

return (
<NextSchemaFieldAdaptor {...formItemProps}>
{textChildren}
Expand Down

0 comments on commit e40bdf2

Please sign in to comment.