From fb7292f71002b45b6883a8c6d9f01bc40d276abc Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Mon, 31 Jul 2023 00:14:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Info=20tooltip=20component=20+?= =?UTF-8?q?=20select=20pop=20list=20bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tiles/Widgets/WidgetsEditModal.tsx | 142 ++++-------------- src/widgets/widgets.ts | 1 - 2 files changed, 32 insertions(+), 111 deletions(-) diff --git a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx index 4f7945bb0..e0bb3879b 100644 --- a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx +++ b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx @@ -17,7 +17,7 @@ import { useMantineTheme, } from '@mantine/core'; import { ContextModalProps } from '@mantine/modals'; -import { IconAlertTriangle, IconPlaylistX, IconPlus, IconAlertCircle } from '@tabler/icons-react'; +import { IconAlertTriangle, IconPlaylistX, IconPlus, IconInfoCircle } from '@tabler/icons-react'; import { Trans, useTranslation } from 'next-i18next'; import { FC, useState } from 'react'; @@ -136,7 +136,6 @@ const WidgetOptionTypeSwitch: FC<{ handleChange: (key: string, value: IntegrationOptionsValueType) => void; }> = ({ option, widgetId, propName: key, value, handleChange }) => { const { t } = useTranslation([`modules/${widgetId}`, 'common']); - const { colorScheme } = useMantineTheme(); const info = option.info ?? false; switch (option.type) { @@ -149,18 +148,7 @@ const WidgetOptionTypeSwitch: FC<{ onChange={(ev) => handleChange(key, ev.currentTarget.checked)} {...option.inputProps} /> - {info && - - - - } + {info && } ); case 'text': @@ -168,18 +156,7 @@ const WidgetOptionTypeSwitch: FC<{ {t(`descriptor.settings.${key}.label`)} - {info && - - - - } + {info && } {t(`descriptor.settings.${key}.label`)} - {info && - - - - } + {info && } handleChange(key, v)} + withinPortal {...option.inputProps} /> @@ -220,24 +187,14 @@ const WidgetOptionTypeSwitch: FC<{ {t(`descriptor.settings.${key}.label`)} - {info && - - - - } + {info && }