UNPKG

@magicbell/magicbell-react

Version:

React components for building a notification inbox for your app

21 lines (20 loc) 664 B
export interface Props { children: (params: { createSubscription: () => Promise<any>; isPushAPISupported: boolean; }) => JSX.Element; serviceWorkerPath?: string; skipServiceWorkerRegistration?: boolean; } /** * Headless component to create subscriptions to push notifications for the * current user. * * @example * <PushNotificationsSubscriber> * {({ createSubscription }) => ( * <button onClick={createSubscription}>Subscribe</button> * )} * <PushNotificationsSubscriber> */ export default function PushNotificationsSubscriber({ children, serviceWorkerPath, skipServiceWorkerRegistration, }: Props): JSX.Element;