Skip to content

Commit 251421d

Browse files
authored
fix(FormItem): apply bottom margin of group on custom Label (#4932)
Fixes #4921
1 parent 5045561 commit 251421d

File tree

1 file changed

+2
-2
lines changed
  • packages/main/src/components/FormItem

1 file changed

+2
-2
lines changed

packages/main/src/components/FormItem/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ function FormItemLabel({ label, style, className }: { label: ReactNode; style?:
8888
}
8989

9090
if (isValidElement(label)) {
91-
const { showColon, wrappingType, className, style: labelStyle, children } = label.props;
91+
const { showColon, wrappingType, style: labelStyle, children } = label.props;
9292
return cloneElement<LabelPropTypes & { 'data-label-span'?: number }>(
9393
label,
9494
{
9595
showColon: showColon ?? true,
9696
wrappingType: wrappingType ?? WrappingType.Normal,
97-
className: `${classes.label} ${className ?? ''}`,
97+
className: clsx(classes.label, className, label.props.className),
9898
style: {
9999
...style,
100100
...(labelStyle || {})

0 commit comments

Comments
 (0)