diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ShowNotification.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ShowNotification.svelte index d95e13cb5f..ef6232b382 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ShowNotification.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ShowNotification.svelte @@ -25,6 +25,8 @@ }, ] + const MAX_DURATION = 120000 // Maximum duration in milliseconds (2 minutes) + onMount(() => { if (!parameters.type) { parameters.type = "success" @@ -33,6 +35,14 @@ parameters.autoDismiss = true } }) + + function handleDurationChange(event) { + let newDuration = event.detail + if (newDuration > MAX_DURATION) { + newDuration = MAX_DURATION + } + parameters.duration = newDuration + }