From ef88e86c49a48e543c7f68059c605d9081b73b6b Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 7 Aug 2023 21:16:23 +0000 Subject: [PATCH] added motor action --- App.js | 29 ++ locales/de.json | 11 + locales/en.json | 11 + .../AddSceneAction/LayerSelection/index.js | 2 +- .../Device/modals/AddSceneAction/index.js | 20 +- .../Device/modals/ChooseScene/index.js | 2 +- .../Device/modals/EditActions/Lights/index.js | 99 ++--- .../Device/modals/EditActions/Motor/index.js | 155 ++++++++ .../Device/modals/EditActions/index.js | 54 ++- src/Screens/Device/scene.js | 342 +++++++++--------- src/utils.js | 130 ++++++- 11 files changed, 607 insertions(+), 248 deletions(-) create mode 100644 src/Screens/Device/modals/EditActions/Motor/index.js diff --git a/App.js b/App.js index 64733ac..fd63e46 100644 --- a/App.js +++ b/App.js @@ -35,6 +35,9 @@ import LightsEditActionModalContent, { LightsEditActionColorModeSelectionModalContent, } from "./src/Screens/Device/modals/EditActions/Lights"; import { EditActionAnimationSelectionModalContent } from "./src/Screens/Device/modals/EditActions"; +import MotorEditActionModalContent, { + MotorEditActionMotorModeSelectionModalContent, +} from "./src/Screens/Device/modals/EditActions/Motor"; const Drawer = createDrawerNavigator(); const Stack = createStackNavigator(); @@ -205,6 +208,32 @@ export function MyApp() { } /> + + options({ + navigation: navigation, + pageTitle: t( + "screens.device.scenes.editActions.modalMotorEditAction.pageTitle" + ), + }) + } + /> + + + options({ + navigation: navigation, + pageTitle: t( + "screens.device.scenes.editActions.modalMotorEditActionMotorModeSelection.pageTitle" + ), + }) + } + /> + [...arr, newAction]); - route.params["actionId"] = newAction.actionId; + route.params["action"] = newAction; navigation.navigate(AppSelectedUserDevice.current.routeName); navigation.navigate("modalLightsEditAction", { diff --git a/src/Screens/Device/modals/AddSceneAction/index.js b/src/Screens/Device/modals/AddSceneAction/index.js index d138af6..1be1887 100644 --- a/src/Screens/Device/modals/AddSceneAction/index.js +++ b/src/Screens/Device/modals/AddSceneAction/index.js @@ -94,7 +94,7 @@ export default function AddSceneActionModalContent({ navigation, route }) { appContext.setDeviceSceneActions((arr) => [...arr, newAction]); - route.params["actionId"] = newAction.actionId; + route.params["action"] = newAction; if (actionType === Constants.actionType.ambilight) { route.params["actionType"] = Constants.actionType.ambilight; @@ -111,7 +111,9 @@ export default function AddSceneActionModalContent({ navigation, route }) { text={t("screens.device.scenes.modalAddSceneAction.actions.layers")} iconName={ActionTypeIconName(Constants.actionType.layers)} imageSource={require("../../../../../assets/layers.gif")} - onPress={() => navigation.navigate("modalLayerSelection", route.params)} + onPress={() => + navigation.navigate("modalLayerSelection", route.params) + } deviceFirmwareVersion={deviceFirmwareVersion} supportedFirmwareVersions={["1.0.1"]} /> @@ -122,13 +124,13 @@ export default function AddSceneActionModalContent({ navigation, route }) { )} iconName={ActionTypeIconName(Constants.actionType.ambilight)} imageSource={require("../../../../../assets/ambilight.gif")} - onPress={() => { + onPress={() => handleCreateAction( Constants.actionType.ambilight, {}, "modalLightsEditAction" - ); - }} + ) + } deviceFirmwareVersion={deviceFirmwareVersion} supportedFirmwareVersions={["1.0.1"]} /> @@ -137,7 +139,13 @@ export default function AddSceneActionModalContent({ navigation, route }) { text={t("screens.device.scenes.modalAddSceneAction.actions.motor")} iconName={ActionTypeIconName(Constants.actionType.motor)} imageSource={require("../../../../../assets/motor.gif")} - onPress={() => console.log("pressed action")} + onPress={() => + handleCreateAction( + Constants.actionType.motor, + {}, + "modalMotorEditAction" + ) + } deviceFirmwareVersion={deviceFirmwareVersion} supportedFirmwareVersions={["1.0.1"]} /> diff --git a/src/Screens/Device/modals/ChooseScene/index.js b/src/Screens/Device/modals/ChooseScene/index.js index 4159a41..e982c15 100644 --- a/src/Screens/Device/modals/ChooseScene/index.js +++ b/src/Screens/Device/modals/ChooseScene/index.js @@ -1,4 +1,4 @@ -import { useCallback, useContext, useEffect, useState } from "react"; +import { useCallback, useContext, useState } from "react"; import { FlatList } from "react-native"; import { AppContext, diff --git a/src/Screens/Device/modals/EditActions/Lights/index.js b/src/Screens/Device/modals/EditActions/Lights/index.js index 27a4b92..d1fa7b2 100644 --- a/src/Screens/Device/modals/EditActions/Lights/index.js +++ b/src/Screens/Device/modals/EditActions/Lights/index.js @@ -31,6 +31,7 @@ import { MyColorPickerV2 } from "../../../../../Components/ColorPicker"; import { EditActionAdjustmentsContent, EditActionAnimationsCardContent, + RenderHeaderRight, } from ".."; import { MyDotsModal, @@ -47,9 +48,7 @@ export default function LightsEditActionModalContent({ navigation, route }) { const colorPickerRef = useRef(ColorPickerRef); const { t } = useTranslation(); - const { actionType, actionId, deviceFirmwareVersion } = route.params; - - console.log("actionType", actionType); + const { actionType, deviceFirmwareVersion, action } = route.params; useFocusEffect( useCallback(() => { @@ -63,47 +62,11 @@ export default function LightsEditActionModalContent({ navigation, route }) { "screens.device.scenes.editActions.modalLightsEditAction.ambilightPageTitle" ), headerRight: () => ( - if the color is changed it will apply on both actions - - icon: "content-duplicate", - label: t( - "screens.device.scenes.modalDotsEditAction.duplicateAction" - ), - onPress: () => { - const currentSelectedAction = - appContext.deviceSceneActions.find( - (a) => a.actionId === actionId - ); - - appContext.setDeviceSceneActions((arr) => { - const duplicatedAction = { - ...currentSelectedAction, - actionId: GetUuid(), - }; - - return [...arr, duplicatedAction]; - }); - - navigation.goBack(); - }, - },*/ - { - icon: "trash-can", - label: t( - "screens.device.scenes.editActions.modalDotsEditAction.deleteAction" - ), - onPress: () => { - appContext.setDeviceSceneActions((actions) => - actions.filter((a) => a.actionId !== actionId) - ); - - navigation.goBack(); - }, - }, - ]} + ), }); @@ -115,40 +78,33 @@ export default function LightsEditActionModalContent({ navigation, route }) { lightMode.supportedFirmwareVersions.includes(deviceFirmwareVersion) ); - const selectedSceneAction = appContext.deviceSceneActions.find( - (a) => a.actionId === actionId - ); - const [lightModeDefaultColors, setLightModeDefaultColors] = useState([]); - // check if selectedSceneAction exists before accessing modeId as the action could be deleted by the user + // check if action exists before accessing modeId as the action could be deleted by the user const selectedLightMode = supportedDeviceLightModes.find( - (s) => s.id === (selectedSceneAction && selectedSceneAction.modeId) + (s) => s.id === (action && action.modeId) ); useEffect(() => { if (colorPickerRef.current && selectedLightMode.defaults.length > 0) { - colorPickerRef.current.setColor( - selectedSceneAction.modeAdjustments.colors[0] - ); + colorPickerRef.current.setColor(action.modeAdjustments.colors[0]); } }, [lightModeDefaultColors]); useEffect(() => { if (selectedLightMode !== undefined) { - sharedLightModeDefaultColors.value = - selectedSceneAction.modeAdjustments.colors; - setLightModeDefaultColors(selectedSceneAction.modeAdjustments.colors); + sharedLightModeDefaultColors.value = action.modeAdjustments.colors; + setLightModeDefaultColors(action.modeAdjustments.colors); setSelectedDefaultLightModeColor(0); } - }, [selectedSceneAction?.modeId]); + }, [action?.modeId]); const saveColorsToModeAdjustments = () => { appContext.setDeviceSceneActions((arr) => { const newArr = [...arr]; const foundSceneActionIndex = arr.findIndex( - (a) => a.actionId === selectedSceneAction.actionId + (a) => a.actionId === action.actionId ); if (foundSceneActionIndex !== -1) { @@ -160,15 +116,10 @@ export default function LightsEditActionModalContent({ navigation, route }) { }); }; - if (!selectedSceneAction) return null; + if (!action) return null; return ( - + @@ -190,7 +141,7 @@ export default function LightsEditActionModalContent({ navigation, route }) { "screens.device.scenes.editActions.modalLightsEditAction.dropdownColorModeSelection.label" )} selectedItemLabel={ - selectedSceneAction.modeId === "" + action.modeId === "" ? t( "screens.device.scenes.editActions.modalLightsEditAction.dropdownColorModeSelection.noColorModeSelected" ) @@ -199,12 +150,12 @@ export default function LightsEditActionModalContent({ navigation, route }) { onPress={() => navigation.navigate("modalLightsEditActionColorModeSelection", { supportedDeviceLightModes: supportedDeviceLightModes, - action: selectedSceneAction, + action: action, }) } /> - {selectedSceneAction.modeId !== "" && ( + {action.modeId !== "" && ( <> {lightModeDefaultColors.length > 0 && ( <> @@ -285,7 +236,7 @@ export default function LightsEditActionModalContent({ navigation, route }) { )} @@ -294,13 +245,13 @@ export default function LightsEditActionModalContent({ navigation, route }) { - + ); } @@ -350,12 +301,12 @@ export function LightsEditActionColorModeSelectionModalContent({ }) { const appContext = useContext(AppContext); - const { action } = route.params; + const { action, supportedDeviceLightModes } = route.params; return ( item.id} renderItem={({ item }) => ( + motorMode.supportedFirmwareVersions.includes(deviceFirmwareVersion) + ); + + // check if action exists before accessing modeId as the action could be deleted by the user + const selectedMotorMode = supportedDeviceMotorModes.find( + (s) => s.id === (action && action.modeId) + ); + + useFocusEffect( + useCallback(() => { + navigation.setOptions({ + headerRight: () => ( + + ), + }); + }, []) + ); + + if (!action) return null; + + return ( + + + + + + + navigation.navigate("modalMotorEditActionMotorModeSelection", { + supportedDeviceMotorModes: supportedDeviceMotorModes, + action: action, + }) + } + /> + + {action.modeId !== "" && ( + + )} + + + + + + ); +} + +export function MotorEditActionMotorModeSelectionModalContent({ + navigation, + route, +}) { + const appContext = useContext(AppContext); + + const { action, supportedDeviceMotorModes } = route.params; + + return ( + + item.id} + renderItem={({ item }) => ( + { + appContext.setDeviceSceneActions((arr) => { + const newArr = [...arr]; + + const actionIndex = newArr.findIndex( + (a) => a.actionId === action.actionId + ); + + if (actionIndex !== -1) { + newArr[actionIndex].modeId = item.id; + + /* const lightModeDefaultColors = + appContext.deviceFirmwareModes.lightModes.find( + (lM) => lM.id === item.id + ); + + if (lightModeDefaultColors !== undefined) { + if (lightModeDefaultColors.defaults !== undefined) { + newArr[actionIndex].modeAdjustments.colors = + appContext.deviceFirmwareModes.lightModes.find( + (lM) => lM.id === item.id + ).defaults; + } + }*/ + + item.adjustments.forEach( + (adjustment) => + (newArr[actionIndex].modeAdjustments[ + adjustment.variableName + ] = adjustment.defaultValue) + ); + } + + return newArr; + }); + + navigation.goBack(); + }} + /> + )} + /> + + ); +} diff --git a/src/Screens/Device/modals/EditActions/index.js b/src/Screens/Device/modals/EditActions/index.js index 533d290..9b77c27 100644 --- a/src/Screens/Device/modals/EditActions/index.js +++ b/src/Screens/Device/modals/EditActions/index.js @@ -10,7 +10,10 @@ import { useTranslation } from "react-i18next"; import Card from "../../../../Components/Card"; import MyDropdown from "../../../../Components/Dropdown"; import MyResult from "../../../../Components/Result"; -import { MyPickerModalListItem } from "../../../../Components/Modal"; +import { + MyDotsModal, + MyPickerModalListItem, +} from "../../../../Components/Modal"; import MySlider from "../../../../Components/Slider"; import MyIcon from "../../../../Components/Icon"; import { useFocusEffect } from "@react-navigation/native"; @@ -236,6 +239,7 @@ export function EditActionAdjustmentsContent({ ); } + console.log("EditActionAdjustmentsContent item type not found"); return Item type not found; }} /> @@ -309,3 +313,51 @@ function EditActionSliderAdjustment({ action, adjustmentType, adjustment }) { ); } + +export function RenderHeaderRight({ navigation, appContext, t, action }) { + return ( + if the color is changed it will apply on both actions + + icon: "content-duplicate", + label: t( + "screens.device.scenes.modalDotsEditAction.duplicateAction" + ), + onPress: () => { + const currentSelectedAction = + appContext.deviceSceneActions.find( + (a) => a.actionId === actionId + ); + + appContext.setDeviceSceneActions((arr) => { + const duplicatedAction = { + ...currentSelectedAction, + actionId: GetUuid(), + }; + + return [...arr, duplicatedAction]; + }); + + navigation.goBack(); + }, + },*/ + { + icon: "trash-can", + label: t( + "screens.device.scenes.editActions.modalDotsEditAction.deleteAction" + ), + onPress: () => { + appContext.setDeviceSceneActions((actions) => + actions.filter((a) => a.actionId !== action.actionId) + ); + + navigation.goBack(); + }, + }, + ]} + /> + ); +} diff --git a/src/Screens/Device/scene.js b/src/Screens/Device/scene.js index b37c43e..9f2f66a 100644 --- a/src/Screens/Device/scene.js +++ b/src/Screens/Device/scene.js @@ -3,11 +3,12 @@ import Card from "../../Components/Card"; import { AppContext, AppSelectedUserDevice, + AppStyles, Constants, GetDevice, VibrateShort, } from "../../utils"; -import { useCallback, useContext, useState } from "react"; +import { useCallback, useContext, useEffect, useState } from "react"; import MyDropdown from "../../Components/Dropdown"; import MyIcon from "../../Components/Icon"; import { useTranslation } from "react-i18next"; @@ -172,10 +173,13 @@ export default function SceneView({ navigation }) { ListFooterComponent={ { + let navigateTo; + let navigateToOptions = { + deviceFirmwareVersion: device.firmware.version, + action: item, + }; + let itemModeList = []; + let adjustments = []; + + const ListItem = ({ text, children }) => { return ( - - {item.modeId === "" - ? "???" - : appContext.deviceFirmwareModes.lightModes.find( - (lM) => lM.id === item.modeId - ).name[appContext.appLanguage]} - + + {text} + {children} + ); }; @@ -236,48 +241,100 @@ function ActionListItem({ drag, navigation, device, item }) { }${usedAnimation.adjustment.unitOfMeasurement[appContext.appLanguage]})`; }; - const ListItemAdjustments = () => { - let adjustments = []; + const ListItemTitle = () => { + return ( + + {item.modeId === "" + ? "???" + : itemModeList.find((m) => m.id === item.modeId).name[ + appContext.appLanguage + ]} + + ); + }; - switch (item.type) { - case Constants.actionType.layers: - if (item.modeAdjustments.layers !== undefined) { - const layerGrammarForm = - item.modeAdjustments.layers.length > 1 - ? t( - "screens.device.scenes.sceneActionsListItems.layers.layer_grammar_form.multipleLayers" - ) - : t( - "screens.device.scenes.sceneActionsListItems.layers.layer_grammar_form.oneLayer" - ); - const affectedLayers = item.modeAdjustments.layers.join(", "); + switch (item.type) { + case Constants.actionType.layers: + navigateTo = "modalLightsEditAction"; + navigateToOptions.actionType = Constants.actionType.layers; + itemModeList = appContext.deviceFirmwareModes.lightModes; - adjustments.push( - - - {appContext.deviceFirmwareModes.lightModes.find( - (lM) => lM.id === item.modeId - ).defaults.length === 0 - ? `${t( - "screens.device.scenes.sceneActionsListItems.layers.applyToLayers", - { - LAYER_GRAMMAR_FORM: layerGrammarForm, - AFFECTED_LAYERS: affectedLayers, - } - )} ` - : `${t( - "screens.device.scenes.sceneActionsListItems.layers.setLayersTo", - { - LAYER_GRAMMAR_FORM: layerGrammarForm, - AFFECTED_LAYERS: affectedLayers, - } - )} ${ - item.modeAdjustments.colors.length === 0 ? "???" : "" - }`} - + if (item.modeAdjustments.layers !== undefined) { + const layerGrammarForm = + item.modeAdjustments.layers.length > 1 + ? t( + "screens.device.scenes.sceneActionsListItems.layers.layer_grammar_form.multipleLayers" + ) + : t( + "screens.device.scenes.sceneActionsListItems.layers.layer_grammar_form.oneLayer" + ); + const affectedLayers = item.modeAdjustments.layers.join(", "); - {item.modeAdjustments.colors !== undefined && - item.modeAdjustments.colors.map((color, index) => ( + const lightMode = appContext.deviceFirmwareModes.lightModes.find( + (lM) => lM.id === item.modeId + ); + + adjustments.push( + + {lightMode.defaults.length === 0 + ? `${t( + "screens.device.scenes.sceneActionsListItems.layers.applyToLayers", + { + LAYER_GRAMMAR_FORM: layerGrammarForm, + AFFECTED_LAYERS: affectedLayers, + } + )} ` + : `${t( + "screens.device.scenes.sceneActionsListItems.layers.setLayersTo", + { + LAYER_GRAMMAR_FORM: layerGrammarForm, + AFFECTED_LAYERS: affectedLayers, + } + )} ${ + item.modeAdjustments.colors.length === 0 ? "???" : "" + }`} + + ) + } + children={ + item.modeAdjustments.colors !== undefined && ( + <> + {item.modeAdjustments.colors.map((color, index) => ( + + ))} + + ) + } + /> + ); + } + break; + case Constants.actionType.ambilight: + navigateTo = "modalLightsEditAction"; + navigateToOptions.actionType = Constants.actionType.ambilight; + itemModeList = appContext.deviceFirmwareModes.lightModes; + + adjustments.push( + {t("screens.device.scenes.sceneActionsListItems.ambilight")} + } + children={ + item.modeAdjustments.colors !== undefined && ( + <> + {item.modeAdjustments.colors.map((color, index) => ( ))} - - ); - } - break; - case Constants.actionType.ambilight: - console.log("item", item); + + ) + } + /> + ); + break; + case Constants.actionType.motor: + navigateTo = "modalMotorEditAction"; + itemModeList = appContext.deviceFirmwareModes.motorModes; - adjustments.push( - - - {t("screens.device.scenes.sceneActionsListItems.ambilight")}{" "} - + //adjustments.push(); + break; + default: + console.log("item type not defined" + item.type); + return; + } - {item.modeAdjustments.colors !== undefined && - item.modeAdjustments.colors.map((color, index) => ( - - ))} - - ); - break; - default: - console.log( - `item type ${item.type} not found in to display ListItemAdjustments` - ); - break; - } + if ( + item.animationInId !== Constants.defaultAnimationId || + item.animationOutId !== Constants.defaultAnimationId + ) { + let inAndOutAnimation = []; - if ( - item.animationInId !== Constants.defaultAnimationId || - item.animationOutId !== Constants.defaultAnimationId - ) { - let inAndOutAnimation = []; - - if (item.animationInId !== Constants.defaultAnimationId) { - inAndOutAnimation.push( - getAnimationText( - appContext.deviceFirmwareModes.lightAnimationsIn, - item.animationInId, - item.animationInAdjustment - ) - ); - } - - if (item.animationOutId !== Constants.defaultAnimationId) { - inAndOutAnimation.push( - getAnimationText( - appContext.deviceFirmwareModes.lightAnimationsOut, - item.animationOutId, - item.animationOutAdjustment - ) - ); - } - - adjustments.push( - - - - {inAndOutAnimation.join(", ")} - - + if (item.animationInId !== Constants.defaultAnimationId) { + inAndOutAnimation.push( + getAnimationText( + appContext.deviceFirmwareModes.lightAnimationsIn, + item.animationInId, + item.animationInAdjustment + ) ); } - return adjustments.map((adjustment, index) => ( - - {adjustment} + if (item.animationOutId !== Constants.defaultAnimationId) { + inAndOutAnimation.push( + getAnimationText( + appContext.deviceFirmwareModes.lightAnimationsOut, + item.animationOutId, + item.animationOutAdjustment + ) + ); + } + + adjustments.push( + + + + {inAndOutAnimation.join(", ")} + - )); - }; + ); + } return ( { - let navigateTo; - let options = { - actionId: item.actionId, - deviceFirmwareVersion: device.firmware.version, - }; - - switch (item.type) { - case Constants.actionType.layers: - navigateTo = "modalLightsEditAction"; - options.actionType = Constants.actionType.layers; - break; - case Constants.actionType.ambilight: - navigateTo = "modalLightsEditAction"; - options.actionType = Constants.actionType.ambilight; - break; - default: - console.log("no navigation defined for item type " + item.type); - return; - } - - navigation.navigate(navigateTo, options); - }} + onPress={() => navigation.navigate(navigateTo, navigateToOptions)} > - - - + + + - - + + + - {item.modeId !== "" && } + {item.modeId !== "" && ( + <> + {adjustments.map((adjustment, index) => ( + + {adjustment} + + ))} + + )} + diff --git a/src/utils.js b/src/utils.js index d4c49d3..378d823 100644 --- a/src/utils.js +++ b/src/utils.js @@ -71,6 +71,9 @@ export const AppStyles = StyleSheet.create({ deviceLivePreview: { height: 200, }, + appBottom: { + marginBottom: 40, + }, }); const DarkAppTheme = { @@ -367,13 +370,134 @@ const devDevicesFirmwareModes = { motorModes: [ { id: "41de8c57-fc99-40a4-b6eb-a8d0d4569bc8", - type: "motor", + supportedFirmwareVersions: ["1.0.1"], name: { de: "Hin und her", en: "Back and forth", }, defaults: [], - adjustments: [], + adjustments: [ + { + type: "slider", + variableName: "duration", + iconName: "repeat-variant", + name: { + de: "Dauer", + en: "Duration", + }, + min: 1, + max: 6, + defaultValue: 2, + unitOfMeasurement: { + de: "s", + en: "s", + }, + }, + ], + }, + ], + motorAnimationsIn: [ + { + id: "b27003a7-447d-4b2b-b89a-5780b91f6614", + supportedFirmwareVersions: ["1.0.1"], + name: { + de: "Ruckartig in", + en: "Jerking in", + }, + defaults: [], + adjustment: { + type: "slider", + variableName: "duration", + iconName: "repeat-variant", + name: { + de: "Dauer", + en: "Duration", + }, + min: 1, + max: 3, + defaultValue: 2, + unitOfMeasurement: { + de: "s", + en: "s", + }, + }, + }, + { + id: "13096781-92d7-4694-a8b8-b3a92399b922", + supportedFirmwareVersions: ["1.0.1"], + name: { + de: "Glatt in", + en: "Smooth in", + }, + defaults: [], + adjustment: { + type: "slider", + variableName: "duration", + iconName: "repeat-variant", + name: { + de: "Dauer", + en: "Duration", + }, + min: 1, + max: 8, + defaultValue: 4, + unitOfMeasurement: { + de: "s", + en: "s", + }, + }, + }, + ], + motorAnimationsOut: [ + { + id: "b27003a7-447d-4b2b-b89a-5780b91f6614", + supportedFirmwareVersions: ["1.0.1"], + name: { + de: "Ruckartig out", + en: "Jerking out", + }, + defaults: [], + adjustment: { + type: "slider", + variableName: "duration", + iconName: "repeat-variant", + name: { + de: "Dauer", + en: "Duration", + }, + min: 1, + max: 3, + defaultValue: 2, + unitOfMeasurement: { + de: "s", + en: "s", + }, + }, + }, + { + id: "13096781-92d7-4694-a8b8-b3a92399b922", + supportedFirmwareVersions: ["1.0.1"], + name: { + de: "Glatt out", + en: "Smooth out", + }, + defaults: [], + adjustment: { + type: "slider", + variableName: "duration", + iconName: "repeat-variant", + name: { + de: "Dauer", + en: "Duration", + }, + min: 1, + max: 8, + defaultValue: 4, + unitOfMeasurement: { + de: "s", + en: "s", + }, + }, }, ], }; @@ -572,7 +696,7 @@ export function VibrateShort() { export function ModalContainer({ children, withoutPadding }) { return ( - {children} + {children} ); }