Skip to content

Commit

Permalink
Make key optional in closeSnackbar
Browse files Browse the repository at this point in the history
  • Loading branch information
iamhosseindhv committed May 17, 2019
1 parent 84d56ae commit abd04cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CombinedClassKey = NotistackClassKey | SnackbarClassKey;

export interface WithSnackbarProps {
enqueueSnackbar: (message: string | React.ReactNode, options?: OptionsObject) => OptionsObject['key'] | null;
closeSnackbar: (key: OptionsObject['key']) => void;
closeSnackbar: (key?: OptionsObject['key']) => void;
}

export function withSnackbar<P extends WithSnackbarProps>(component: React.ComponentType<P>):
Expand Down

0 comments on commit abd04cf

Please sign in to comment.