Skip to content

Commit

Permalink
* improve types for NotificationsProvider to add backward compatibili…
Browse files Browse the repository at this point in the history
…ty for react 17 and @types/react 17
  • Loading branch information
PdoubleU committed Apr 4, 2024
1 parent cc66304 commit 37148c1
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 37148c1

Please sign in to comment.