diff --git a/src/index.d.ts b/src/index.d.ts index 7ce7cb38..ef1e6671 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -14,7 +14,8 @@ export type SnackbarMessage = string | React.ReactNode; export type SnackbarAction = SnackbarContentProps['action'] | ((key: SnackbarKey) => React.ReactNode); export type SnackbarContent = React.ReactNode | ((key: SnackbarKey, message: SnackbarMessage) => React.ReactNode); -export type TransitionCloseHandler = (event: React.SyntheticEvent, reason: string, key: SnackbarKey) => void; +export type CloseReason = 'timeout' | 'clickaway' | 'maxsnack' | null; +export type TransitionCloseHandler = (event: React.SyntheticEvent, reason: CloseReason, key: SnackbarKey) => void; export type TransitionEnterHandler = (node: HTMLElement, isAppearing: boolean, key: SnackbarKey) => void; export type TransitionExitHandler = (node: HTMLElement, key: SnackbarKey) => void; export type TransitionHandlerProps = {