From 96ba8b323317d2fb30dda4669241c6b21d98a600 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 9 May 2023 11:26:13 +0200 Subject: [PATCH] [PM-1950] Add support for a loading state in dialogs (#5268) --- .../src/dialog/dialog/dialog.component.html | 19 +++- .../src/dialog/dialog/dialog.component.ts | 11 +++ .../src/dialog/dialog/dialog.stories.ts | 93 ++++++++++--------- 3 files changed, 79 insertions(+), 44 deletions(-) diff --git a/libs/components/src/dialog/dialog/dialog.component.html b/libs/components/src/dialog/dialog/dialog.component.html index bb3721795f..773b764b22 100644 --- a/libs/components/src/dialog/dialog/dialog.component.html +++ b/libs/components/src/dialog/dialog/dialog.component.html @@ -20,8 +20,23 @@ > -
- +
+
+ +
+
+ +
= (args: DialogComponent) => ({ props: args, template: ` - - {{title}} - Dialog body text goes here. - - - - - - + + {{title}} + Dialog body text goes here. + + + + + + `, }); @@ -94,23 +96,30 @@ Large.args = { title: "Large", }; +export const Loading = Template.bind({}); +Loading.args = { + dialogSize: "large", + loading: true, + title: "Loading", +}; + const TemplateScrolling: Story = (args: DialogComponent) => ({ props: args, template: ` - - Scrolling Example - - Dialog body text goes here.
- - repeating lines of characters
+ + Scrolling Example + + Dialog body text goes here.
+ + repeating lines of characters
+
+ end of sequence! +
+ + + - end of sequence! -
- - - - -
+ `, }); @@ -122,20 +131,20 @@ ScrollingContent.args = { const TemplateTabbed: Story = (args: DialogComponent) => ({ props: args, template: ` - - Tab Content Example - - - First Tab Content - Second Tab Content - Third Tab Content - - - - - - - + + Tab Content Example + + + First Tab Content + Second Tab Content + Third Tab Content + + + + + + + `, });