Skip to content

Commit ad58820

Browse files
authored
Revert "Fix field label overriding display property (#2164)" (#2193)
This reverts commit 4a5dfdb.
1 parent 42c1bc0 commit ad58820

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

packages/@react-spectrum/label/src/Field.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
4747
);
4848

4949
children = React.cloneElement(children, mergeProps(children.props, {
50-
style: {width: '100%'}
50+
className: classNames(
51+
labelStyles,
52+
'spectrum-Field-field'
53+
)
5154
}));
5255

5356
return (
@@ -65,13 +68,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
6568
elementType={elementType}>
6669
{label}
6770
</Label>
68-
<div
69-
className={classNames(
70-
labelStyles,
71-
'spectrum-Field-field'
72-
)}>
73-
{children}
74-
</div>
71+
{children}
7572
</div>
7673
);
7774
}

0 commit comments

Comments
 (0)