From d851f3bb211ae3064b04bc086e5ffae8e110035e Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Thu, 3 Aug 2023 15:14:26 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Added=20infocard=20to=20location=20?= =?UTF-8?q?widget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tiles/Widgets/Inputs/LocationSelection.tsx | 10 ++++++++-- .../Dashboard/Tiles/Widgets/WidgetsEditModal.tsx | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Dashboard/Tiles/Widgets/Inputs/LocationSelection.tsx b/src/components/Dashboard/Tiles/Widgets/Inputs/LocationSelection.tsx index dd7d257b0..c4ea4eff5 100644 --- a/src/components/Dashboard/Tiles/Widgets/Inputs/LocationSelection.tsx +++ b/src/components/Dashboard/Tiles/Widgets/Inputs/LocationSelection.tsx @@ -4,6 +4,7 @@ import { Button, Card, Center, + Flex, Group, Loader, Modal, @@ -23,13 +24,14 @@ import { City } from '~/server/api/routers/weather'; import { api } from '~/utils/api'; import { IntegrationOptionsValueType } from '../WidgetsEditModal'; -import Link from 'next/link'; +import { InfoCard } from '~/components/InfoCard/InfoCard'; type LocationSelectionProps = { widgetId: string; propName: string; value: any; handleChange: (key: string, value: IntegrationOptionsValueType) => void; + info?: boolean; }; export const LocationSelection = ({ @@ -37,6 +39,7 @@ export const LocationSelection = ({ propName: key, value, handleChange, + info, }: LocationSelectionProps) => { const { t } = useTranslation('widgets/location'); const [query, setQuery] = useState(value.name ?? ''); @@ -58,7 +61,10 @@ export const LocationSelection = ({ <> - {t(`modules/${widgetId}:descriptor.settings.${key}.label`)} + + {t(`modules/${widgetId}:descriptor.settings.${key}.label`)} + {info && } + );