Skip to content

Commit

Permalink
fix: no children prop (types) - followup (#262)
Browse files Browse the repository at this point in the history
* improve types for NotificationsProvider to add backward compatibility for react 17 and @types/react 17
  • Loading branch information
PdoubleU committed Apr 4, 2024
1 parent 60a3f2c commit a7dd2a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ export type UseNotification<V extends VariantsMap = Variants> = () => Emmiter<V>

export type CreateNotificationsReturnType<V extends VariantsMap = Variants> = {
useNotifications: UseNotification<V>
NotificationsProvider: React.FC<React.PropsWithChildren>
ModalNotificationsProvider: React.FC<React.PropsWithChildren<{ notificationTopPosition?: number }>>
NotificationsProvider: React.FC<React.PropsWithChildren<Record<never, any>>>
ModalNotificationsProvider: React.FC<
React.PropsWithChildren<{ notificationTopPosition?: number }>
>
CustomVariantsTypeHelper: V
} & ReturnType<UseNotification<V>>

Expand Down

0 comments on commit a7dd2a0

Please sign in to comment.