Skip to content

Commit

Permalink
fix(FormItem): apply bottom margin of group on custom Label (#4932)
Browse files Browse the repository at this point in the history
Fixes #4921
  • Loading branch information
Lukas742 authored Aug 1, 2023
1 parent 5045561 commit 251421d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/components/FormItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ function FormItemLabel({ label, style, className }: { label: ReactNode; style?:
}

if (isValidElement(label)) {
const { showColon, wrappingType, className, style: labelStyle, children } = label.props;
const { showColon, wrappingType, style: labelStyle, children } = label.props;
return cloneElement<LabelPropTypes & { 'data-label-span'?: number }>(
label,
{
showColon: showColon ?? true,
wrappingType: wrappingType ?? WrappingType.Normal,
className: `${classes.label} ${className ?? ''}`,
className: clsx(classes.label, className, label.props.className),
style: {
...style,
...(labelStyle || {})
Expand Down

0 comments on commit 251421d

Please sign in to comment.