From 76d67a5902d4cb8a029f9363aa0a767b446f4e8f Mon Sep 17 00:00:00 2001 From: Shehab Rahal Date: Tue, 12 Sep 2023 09:39:57 +0800 Subject: [PATCH 1/2] fix: toast animation --- packages/components/toast/src/stories/ToastDemo.vue | 6 +++--- packages/components/toast/src/stories/toast.css | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/components/toast/src/stories/ToastDemo.vue b/packages/components/toast/src/stories/ToastDemo.vue index 2a94b7eed..652d7db49 100644 --- a/packages/components/toast/src/stories/ToastDemo.vue +++ b/packages/components/toast/src/stories/ToastDemo.vue @@ -216,15 +216,15 @@ export interface IToastProps { } [data-swipe="end"][data-swipe-direction="left"] { - animation-name: slideRight; + animation-name: slideLeft; } [data-swipe="end"][data-swipe-direction="up"] { - animation-name: slideRight; + animation-name: slideUp; } [data-swipe="end"][data-swipe-direction="down"] { - animation-name: slideRight; + animation-name: slideDown; } .chromatic-viewport { diff --git a/packages/components/toast/src/stories/toast.css b/packages/components/toast/src/stories/toast.css index 55cade8d6..f9a4bef3b 100644 --- a/packages/components/toast/src/stories/toast.css +++ b/packages/components/toast/src/stories/toast.css @@ -157,15 +157,15 @@ } [data-swipe="end"][data-swipe-direction="left"] { - animation-name: slideRight; + animation-name: slideLeft; } [data-swipe="end"][data-swipe-direction="up"] { - animation-name: slideRight; + animation-name: slideUp; } [data-swipe="end"][data-swipe-direction="down"] { - animation-name: slideRight; + animation-name: slideDown; } .chromatic-viewport { From 34dc9af375c84925e1a6cc136e11933cb203a065 Mon Sep 17 00:00:00 2001 From: Shehab Rahal Date: Tue, 12 Sep 2023 09:49:08 +0800 Subject: [PATCH 2/2] refactor: uncomment FromDialog story --- .../toast/src/stories/FromDialog.vue | 5 +++- .../toast/src/stories/Toast.stories.ts | 28 +++++++++---------- .../toast/src/stories/ToastDemo.vue | 7 +++-- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/packages/components/toast/src/stories/FromDialog.vue b/packages/components/toast/src/stories/FromDialog.vue index 327ec0340..6ee591176 100644 --- a/packages/components/toast/src/stories/FromDialog.vue +++ b/packages/components/toast/src/stories/FromDialog.vue @@ -1,9 +1,12 @@ diff --git a/packages/components/toast/src/stories/Toast.stories.ts b/packages/components/toast/src/stories/Toast.stories.ts index 1da296f88..a97d7c02e 100644 --- a/packages/components/toast/src/stories/Toast.stories.ts +++ b/packages/components/toast/src/stories/Toast.stories.ts @@ -51,20 +51,20 @@ export const Controlled: Story = { }), } -// export const FromDialog: Story = { -// args: { -// template: 'FromDialog', -// }, -// render: (args: any) => ({ -// components: { OkuToastComponent }, -// setup() { -// return { args } -// }, -// template: ` -// -// `, -// }), -// } +export const FromDialog: Story = { + args: { + template: 'FromDialog', + }, + render: (args: any) => ({ + components: { OkuToastComponent }, + setup() { + return { args } + }, + template: ` + + `, + }), +} export const Promise: Story = { args: { diff --git a/packages/components/toast/src/stories/ToastDemo.vue b/packages/components/toast/src/stories/ToastDemo.vue index 652d7db49..047ca8691 100644 --- a/packages/components/toast/src/stories/ToastDemo.vue +++ b/packages/components/toast/src/stories/ToastDemo.vue @@ -7,6 +7,7 @@ import Animated from './Animated.vue' import Cypress from './Cypress.vue' import Chromatic from './Chromatic.vue' import Styled from './Styled.vue' +import FromDialog from './FromDialog.vue' withDefaults(defineProps(), {}) const VIEWPORT_PADDING = '20px' @@ -25,10 +26,10 @@ export interface IToastProps { - - +