From ed8d94138c192e366967333ab32996747beef35f Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Sat, 17 Jul 2021 16:06:43 -0400 Subject: [PATCH] Minimal fix for Material-UI 4.12.x class name change Fixes #394. --- src/SnackbarContainer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SnackbarContainer.tsx b/src/SnackbarContainer.tsx index 37e52cc8..a0c6cdf9 100644 --- a/src/SnackbarContainer.tsx +++ b/src/SnackbarContainer.tsx @@ -5,8 +5,10 @@ import { SNACKBAR_INDENTS } from './utils/constants'; import { SnackbarProviderProps } from '.'; const collapse = { - container: '& > .MuiCollapse-container', - wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper', + // Material-UI 4.12.x and above uses MuiCollapse-root; earlier versions use + // Mui-Collapse-container. https://github.com/mui-org/material-ui/pull/24084 + container: '& > .MuiCollapse-container, & > .MuiCollapse-root', + wrapper: '& > .MuiCollapse-container > .MuiCollapse-wrapper, & > .MuiCollapse-root > .MuiCollapse-wrapper', }; const xsWidthMargin = 16;