From 301c4e3adf473e6665113ce5496311002ab72bab Mon Sep 17 00:00:00 2001 From: adriangohjw Date: Fri, 10 Jan 2025 04:43:26 +0800 Subject: [PATCH] add loading state story --- .../DynamicDataBanner.stories.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/components/src/templates/next/components/complex/DynamicDataBanner/DynamicDataBanner.stories.tsx b/packages/components/src/templates/next/components/complex/DynamicDataBanner/DynamicDataBanner.stories.tsx index ec962ff33..49756be59 100644 --- a/packages/components/src/templates/next/components/complex/DynamicDataBanner/DynamicDataBanner.stories.tsx +++ b/packages/components/src/templates/next/components/complex/DynamicDataBanner/DynamicDataBanner.stories.tsx @@ -103,6 +103,20 @@ export const Default: Story = { }, } +export const Loading: Story = { + parameters: { + msw: { + handlers: [ + http.get("https://jsonplaceholder.com/muis_prayers_time", () => { + return new Promise(() => { + // Never resolve the promise + }) + }), + ], + }, + }, +} + export const Error: Story = { parameters: { msw: {