Skip to content

Commit 8a06099

Browse files
authored
fix(#4222): UNSAFE_className is overridden with built in ClassNames (#4262)
* fixes UNSAFE_className override in Datepicker
1 parent b962590 commit 8a06099

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

packages/@react-spectrum/datepicker/src/DateField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: F
6363
descriptionProps={descriptionProps}
6464
errorMessageProps={errorMessageProps}
6565
validationState={state.validationState}
66-
UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
66+
wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
6767
<Input
6868
ref={inputRef}
6969
fieldProps={fieldProps}

packages/@react-spectrum/datepicker/src/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function DatePicker<T extends DateValue>(props: SpectrumDatePickerProps<T>, ref:
119119
descriptionProps={descriptionProps}
120120
errorMessageProps={errorMessageProps}
121121
validationState={state.validationState}
122-
UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
122+
wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
123123
<div
124124
{...mergeProps(groupProps, hoverProps, focusProps)}
125125
className={className}

packages/@react-spectrum/datepicker/src/DateRangePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ function DateRangePicker<T extends DateValue>(props: SpectrumDateRangePickerProp
119119
descriptionProps={descriptionProps}
120120
errorMessageProps={errorMessageProps}
121121
validationState={state.validationState}
122-
UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
122+
wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>
123123
<div
124124
{...mergeProps(groupProps, hoverProps, focusProps)}
125125
className={className}

packages/@react-spectrum/datepicker/src/TimeField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function TimeField<T extends TimeValue>(props: SpectrumTimeFieldProps<T>, ref: F
5353
descriptionProps={descriptionProps}
5454
errorMessageProps={errorMessageProps}
5555
validationState={state.validationState}
56-
UNSAFE_className={classNames(datepickerStyles, 'react-spectrum-TimeField-fieldWrapper')}>
56+
wrapperClassName={classNames(datepickerStyles, 'react-spectrum-TimeField-fieldWrapper')}>
5757
<Input
5858
ref={inputRef}
5959
fieldProps={fieldProps}

packages/@react-spectrum/tag/src/TagGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef
161161
showErrorIcon
162162
ref={domRef}
163163
elementType="span"
164-
UNSAFE_className={
164+
wrapperClassName={
165165
classNames(
166166
styles,
167167
'spectrum-Tags-fieldWrapper',

0 commit comments

Comments
 (0)