We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3b099a commit 4a5dfdbCopy full SHA for 4a5dfdb
packages/@react-spectrum/label/src/Field.tsx
@@ -47,10 +47,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
47
);
48
49
children = React.cloneElement(children, mergeProps(children.props, {
50
- className: classNames(
51
- labelStyles,
52
- 'spectrum-Field-field'
53
- )
+ style: {width: '100%'}
54
}));
55
56
return (
@@ -68,7 +65,13 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
68
65
elementType={elementType}>
69
66
{label}
70
67
</Label>
71
- {children}
+ <div
+ className={classNames(
+ labelStyles,
+ 'spectrum-Field-field'
72
+ )}>
73
+ {children}
74
+ </div>
75
</div>
76
77
}
0 commit comments