Skip to content

Commit 0e61098

Browse files
Michael JordanreidbarberyihuiliaoLFDanLu
authored
fix(#6109): SpectrumFieldProps should return labelProps that can be spread on a label or React-Spectrum Label (#6111)
Co-authored-by: Reid Barber <reid@reidbarber.com> Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Co-authored-by: Daniel Lu <dl1644@gmail.com>
1 parent 94a1176 commit 0e61098

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@react-types/label/src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import {Alignment, DOMProps, LabelPosition, NecessityIndicator, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation, ValidationResult} from '@react-types/shared';
14-
import {ElementType, HTMLAttributes, ReactElement, ReactNode} from 'react';
14+
import {ElementType, HTMLAttributes, LabelHTMLAttributes, ReactElement, ReactNode} from 'react';
1515

1616
export interface LabelProps {
1717
children?: ReactNode,
@@ -34,7 +34,7 @@ export interface SpectrumFieldProps extends SpectrumLabelPropsBase, SpectrumHelp
3434
children: ReactElement,
3535
label?: ReactNode,
3636
contextualHelp?: ReactNode,
37-
labelProps?: HTMLAttributes<HTMLElement>,
37+
labelProps?: LabelHTMLAttributes<HTMLLabelElement>,
3838
descriptionProps?: HTMLAttributes<HTMLElement>,
3939
errorMessageProps?: HTMLAttributes<HTMLElement>,
4040
wrapperClassName?: string,

0 commit comments

Comments
 (0)