diff --git a/src/components/Toast/Toast.stories.ts b/src/components/Toast/Toast.stories.ts index 58c792af75b777e88d6cc1129a7e9942b1aba62f..7b36869c727801899ffda9251d94a2edd51e5f49 100644 --- a/src/components/Toast/Toast.stories.ts +++ b/src/components/Toast/Toast.stories.ts @@ -23,7 +23,7 @@ const meta: Meta = { options: ['topRight', 'bottomRight', 'bottomLeft', 'topLeft', 'top', 'bottom'], }, active: { control: 'boolean' }, - static: { control: 'boolean' }, + duration: { control: 'number' }, width: { control: 'text' }, header: { control: 'text' }, text: { control: 'text' }, diff --git a/src/components/Toast/Toast.vue b/src/components/Toast/Toast.vue index 4ba7ea0ff6fe1180863e6d8f2da763a8c381e4b1..bcf16cec8d7a5a46644c696c288548f831a0bf19 100644 --- a/src/components/Toast/Toast.vue +++ b/src/components/Toast/Toast.vue @@ -132,7 +132,7 @@ watch(active, () => { toastsContainer?.appendChild(toast.value); toastsContainer.style[positionParts.value[0] as 'top' | 'bottom'] = '20px'; - timeout = setTimeout(() => (active.value = false), (props.duration as number) * 1000); + timeout = setTimeout(() => (active.value = false), (props.duration as number) * 1000) as unknown as number; } else if (props.duration) { toast.value.classList.remove('active'); setTimeout(() => {