diff --git a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx index aeadcf000..6dbbabda9 100644 --- a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx +++ b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx @@ -136,10 +136,11 @@ const WidgetOptionTypeSwitch: FC<{ handleChange: (key: string, value: IntegrationOptionsValueType) => void; }> = ({ option, widgetId, propName: key, value, handleChange }) => { const { t } = useTranslation([`modules/${widgetId}`, 'common']); - const { fn } = useMantineTheme(); + const { fn, colorScheme } = useMantineTheme(); switch (option.type) { case 'switch': + var info = option.info !== undefined ? option.info : false; return ( handleChange(key, ev.currentTarget.checked)} {...option.inputProps} /> - {option.info? - + {info? + : undefined } ); case 'text': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -174,12 +176,13 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'multi-select': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -194,12 +197,13 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'select': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -214,12 +218,13 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'number': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -232,12 +237,13 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'slider': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -264,6 +270,7 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'draggable-list': + var info = option.info !== undefined ? option.info : false; /* eslint-disable no-case-declarations */ const typedVal = value as IDraggableListInputValue['defaultValue']; @@ -290,8 +297,8 @@ const WidgetOptionTypeSwitch: FC<{ {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -319,12 +326,13 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'multiple-text': + var info = option.info !== undefined ? option.info : false; return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined } @@ -347,13 +355,14 @@ const WidgetOptionTypeSwitch: FC<{ ); case 'draggable-editable-list': + var info = option.info !== undefined ? option.info : false; const { t: translateDraggableList } = useTranslation('widgets/draggable-list'); return ( {t(`descriptor.settings.${key}.label`)} - {option.info? - + {info? + : undefined }