UNPKG

@ntragas/pouncejstest

Version:

A collection of UI components from Panther labs

18 lines (17 loc) 752 B
import React from 'react'; import { SnackbarProps } from '../Snackbar'; declare type SnackbarContextValue = { pushSnackbar: (props: SnackbarPublicProps) => string; updateSnackbar: (id: string, props: SnackbarPublicProps) => string; }; declare type SnackbarPublicProps = Omit<SnackbarProps, 'destroy'>; /** * A component that acts both as a state-manager and provider. It provides access to methods for * managing snackbar instances */ export declare const SnackbarProvider: React.FC; /** A shortcut for the consumer component */ export declare const SnackbarConsumer: React.Consumer<SnackbarContextValue>; /** An alternative to the consumer component through hooks */ export declare const useSnackbar: () => SnackbarContextValue; export {};