unbreak snackbars

I broke these with the material-ui 5 upgrade.
https://next.material-ui.com/guides/migration-v4/ says that
Snackbar's onExited was removed in favor of TransitionProps.
This commit is contained in:
Scott Lamb 2021-03-04 15:01:18 -08:00
parent fbaf7517aa
commit 2677184c58

View File

@ -40,7 +40,7 @@ export interface MySnackbarProps
| "anchorOrigin" | "anchorOrigin"
| "open" | "open"
| "handleClosed" | "handleClosed"
| "handleExited" | "TransitionProps"
| "actions" | "actions"
> { > {
key?: React.Key; key?: React.Key;
@ -164,7 +164,9 @@ export class SnackbarProvider
onClose={(event, reason) => onClose={(event, reason) =>
this.handleCloseSnackbar(first.key, event, reason) this.handleCloseSnackbar(first.key, event, reason)
} }
onExited={() => this.handleSnackbarExited(first.key)} TransitionProps={{
onExited: () => this.handleSnackbarExited(first.key),
}}
action={ action={
<IconButton <IconButton
size="small" size="small"