From b0bdb4c09014ab4f21a98ee4a164dde8819fbfca Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 4 Jan 2023 22:46:05 +0900 Subject: [PATCH] Add small notification when adding widget --- .../Components/WidgetsTab/WidgetElementType.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Dashboard/Modals/SelectElement/Components/WidgetsTab/WidgetElementType.tsx b/src/components/Dashboard/Modals/SelectElement/Components/WidgetsTab/WidgetElementType.tsx index 01caf6c8b..af0e61902 100644 --- a/src/components/Dashboard/Modals/SelectElement/Components/WidgetsTab/WidgetElementType.tsx +++ b/src/components/Dashboard/Modals/SelectElement/Components/WidgetsTab/WidgetElementType.tsx @@ -1,5 +1,6 @@ import { useModals } from '@mantine/modals'; -import { TablerIcon } from '@tabler/icons'; +import { showNotification } from '@mantine/notifications'; +import { IconChecks, TablerIcon } from '@tabler/icons'; import { useTranslation } from 'next-i18next'; import { useConfigContext } from '../../../../../../config/provider'; import { useConfigStore } from '../../../../../../config/store'; @@ -61,8 +62,13 @@ export const WidgetElementType = ({ id, image, disabled, widget }: WidgetElement true, !isEditMode ); - closeModal('selectElement'); + showNotification({ + title: t('descriptor.name'), + message: t('descriptor.description'), + icon: , + color: 'teal', + }); }; return (