From 7104b14b29f97f310e3b804ed0ab354f76410de5 Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Sun, 25 Jul 2021 16:55:48 -0400 Subject: [PATCH] Support Collapse with root and container class keys (#408) 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;