aboutsummaryrefslogtreecommitdiffstats
path: root/packages/renderer/src/components/NotificationBanner.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/renderer/src/components/NotificationBanner.tsx')
-rw-r--r--packages/renderer/src/components/NotificationBanner.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/renderer/src/components/NotificationBanner.tsx b/packages/renderer/src/components/NotificationBanner.tsx
index d591e14..36c192a 100644
--- a/packages/renderer/src/components/NotificationBanner.tsx
+++ b/packages/renderer/src/components/NotificationBanner.tsx
@@ -23,6 +23,7 @@ import Alert, { AlertColor } from '@mui/material/Alert';
23import Box from '@mui/material/Box'; 23import Box from '@mui/material/Box';
24import { styled } from '@mui/material/styles'; 24import { styled } from '@mui/material/styles';
25import React, { ReactNode } from 'react'; 25import React, { ReactNode } from 'react';
26import { useTranslation } from 'react-i18next';
26 27
27const NotificationBannerRoot = styled(Alert)(({ theme }) => ({ 28const NotificationBannerRoot = styled(Alert)(({ theme }) => ({
28 paddingTop: 7, 29 paddingTop: 7,
@@ -77,11 +78,14 @@ export default function NotificationBanner({
77 buttons?: ReactNode; 78 buttons?: ReactNode;
78 children?: ReactNode; 79 children?: ReactNode;
79}): JSX.Element { 80}): JSX.Element {
81 const { t } = useTranslation();
82
80 return ( 83 return (
81 <NotificationBannerRoot 84 <NotificationBannerRoot
82 severity={severity ?? 'success'} 85 severity={severity ?? 'success'}
83 icon={icon ?? false} 86 icon={icon ?? false}
84 onClose={onClose} 87 onClose={onClose}
88 closeText={t<string>('banner.close')}
85 > 89 >
86 <NotificationBannerText>{children}</NotificationBannerText> 90 <NotificationBannerText>{children}</NotificationBannerText>
87 {buttons && ( 91 {buttons && (