File tree 2 files changed +17
-1
lines changed
stories/5-components/Notifications
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export interface AuLoaderSignature {
27
27
Args: {
28
28
inline? : boolean ;
29
29
hideMessage? : boolean ;
30
+ centered? : boolean ;
30
31
// Deprecated arguments
31
32
disableMessage? : boolean ;
32
33
message? : string ;
@@ -49,9 +50,17 @@ export default class AuLoader extends Component<AuLoaderSignature> {
49
50
return this .args .message || ' Aan het laden' ;
50
51
}
51
52
53
+ get centered() {
54
+ if (typeof this .args .centered === ' undefined' || this .args .centered ) {
55
+ return ' au-u-text-center' ;
56
+ }
57
+
58
+ return ' ' ;
59
+ }
60
+
52
61
<template >
53
62
{{#if ( has-block ) }}
54
- <div class =" au-c-loader au-u-text-center " role =" status" ...attributes >
63
+ <div class =" au-c-loader {{ this .centered }} " role =" status" ...attributes >
55
64
<LoadingAnimation />
56
65
{{#if @ inline }}
57
66
<span
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ export default {
15
15
control : 'boolean' ,
16
16
description : 'Hide the loading text' ,
17
17
} ,
18
+ centered : {
19
+ control : 'boolean' ,
20
+ description :
21
+ 'Allows you to opt-out of the centered positioning. defaults to `true`' ,
22
+ } ,
18
23
} ,
19
24
parameters : {
20
25
layout : 'padded' ,
@@ -26,6 +31,7 @@ const Template = (args) => ({
26
31
<AuLoader
27
32
@inline={{this.inline}}
28
33
@hideMessage={{this.hideMessage}}
34
+ @centered={{this.centered}}
29
35
>{{this.message}}</AuLoader>` ,
30
36
context : args ,
31
37
} ) ;
@@ -35,4 +41,5 @@ Component.args = {
35
41
message : 'Aan het laden' ,
36
42
inline : false ,
37
43
hideMessage : false ,
44
+ centered : true ,
38
45
} ;
You can’t perform that action at this time.
0 commit comments