From af8ada9a627283dc1c5d3325fe2bcde5df5321b3 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 2 Jan 2025 03:04:14 +0100 Subject: [PATCH] Always add close button to snackbars --- .../components/snackbar/SnackbarWithDescription.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/core/components/snackbar/SnackbarWithDescription.tsx b/src/modules/core/components/snackbar/SnackbarWithDescription.tsx index 3526d3a23b..d88a1996bd 100644 --- a/src/modules/core/components/snackbar/SnackbarWithDescription.tsx +++ b/src/modules/core/components/snackbar/SnackbarWithDescription.tsx @@ -6,7 +6,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { CustomContentProps, SnackbarContent, VariantType } from 'notistack'; +import { closeSnackbar, CustomContentProps, SnackbarContent, VariantType } from 'notistack'; import { ForwardedRef, forwardRef, Fragment, memo } from 'react'; import Alert from '@mui/material/Alert'; import AlertTitle from '@mui/material/AlertTitle'; @@ -55,7 +55,13 @@ export const SnackbarWithDescription = memo( return ( - + closeSnackbar(id)} + > {message} {actualDescription} {isDescriptionTooLong ? (