Skip to content

Commit a7dd2a0

Browse files
authored
fix: no children prop (types) - followup (#262)
* improve types for NotificationsProvider to add backward compatibility for react 17 and @types/react 17
1 parent 60a3f2c commit a7dd2a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ export type UseNotification<V extends VariantsMap = Variants> = () => Emmiter<V>
5757

5858
export type CreateNotificationsReturnType<V extends VariantsMap = Variants> = {
5959
useNotifications: UseNotification<V>
60-
NotificationsProvider: React.FC<React.PropsWithChildren>
61-
ModalNotificationsProvider: React.FC<React.PropsWithChildren<{ notificationTopPosition?: number }>>
60+
NotificationsProvider: React.FC<React.PropsWithChildren<Record<never, any>>>
61+
ModalNotificationsProvider: React.FC<
62+
React.PropsWithChildren<{ notificationTopPosition?: number }>
63+
>
6264
CustomVariantsTypeHelper: V
6365
} & ReturnType<UseNotification<V>>
6466

0 commit comments

Comments
 (0)