Skip to content

Commit 47e9062

Browse files
committed
Fix: Make CalendarIconProps.icon optional
- Changed CalendarIconProps.icon from required to optional - Updated related types to avoid breaking changes - Ensured backward compatibility Using React 18.3.1, the 'icon' property obtained via Pick became required, causing a type error. To prevent this issue, I explicitly marked 'icon' as optional by using Partial.
1 parent 8883ad1 commit 47e9062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export type DatePickerProps = OmitUnion<
125125
| "selectsMultiple"
126126
| "dropdownMode"
127127
> &
128-
Pick<CalendarIconProps, "icon"> &
128+
Partial<Pick<CalendarIconProps, "icon">> &
129129
OmitUnion<PortalProps, "children" | "portalId"> &
130130
OmitUnion<
131131
PopperComponentProps,

0 commit comments

Comments
 (0)