33
33
</ div >
34
34
</ div >
35
35
</ div >
36
- < div class ="o-grid__cell o-grid__cell--width-50 u-letter-box--small "> < pre class ="c-pre html "> < code class ="c-code c-code--multiline "> <div class="c-alerts">
37
- <div class="c-alerts__alert">
38
- <button class="c-button c-button--close"> ×</button>
39
- Default
40
- </div>
41
- <div class="c-alerts__alert c-alerts__alert--primary">
42
- <button class="c-button c-button--close"> ×</button>
43
- Primary
44
- </div>
45
- <div class="c-alerts__alert c-alerts__alert--secondary">
46
- <button class="c-button c-button--close"> ×</button>
47
- Secondary
48
- </div>
49
- <div class="c-alerts__alert c-alerts__alert--success">
50
- <button class="c-button c-button--close"> ×</button>
51
- Success
52
- </div>
53
- <div class="c-alerts__alert c-alerts__alert--error">
54
- <button class="c-button c-button--close"> ×</button>
55
- Error
56
- </div>
57
- </div> </ code > </ pre > </ div >
36
+ < div class ="o-grid__cell o-grid__cell--width-50 u-letter-box--small "> < pre class ="c-pre html "> < code class ="c-code c-code--multiline "> <Alert closable> Alert</Alert>
37
+ <Alert primary closable> Alert</Alert>
38
+ <Alert secondary closable> Alert</Alert>
39
+ <Alert success closable> Alert</Alert>
40
+ <Alert error closable> Alert</Alert>
41
+ </ code > </ pre > </ div >
58
42
</ div >
59
43
60
44
< h2 id ="animation " class ="c-heading c-heading--medium "> Animation</ h2 >
@@ -68,6 +52,9 @@ <h2 id="animation" class="c-heading c-heading--medium">Animation</h2>
68
52
69
53
< button class ="c-button c-button--ghost-secondary " type ="button " onclick ="demo() "> Animate</ button >
70
54
55
+ < div class ="o-grid__cell o-grid__cell--width-50 u-letter-box--small "> < pre class ="c-pre html "> < code class ="c-code c-code--multiline "> <Alert animation="slow" closable> Alert</Alert>
56
+ </ code > </ pre > </ div >
57
+
71
58
< script >
72
59
function demo ( ) {
73
60
document . getElementById ( 'animate' ) . classList . remove ( 'a-alerts' ) ;
@@ -77,23 +64,12 @@ <h2 id="animation" class="c-heading c-heading--medium">Animation</h2>
77
64
}
78
65
</ script >
79
66
80
- < h3 class ="c-heading c-heading--small c-text--mono "> .a-alerts</ h3 >
81
- < p class ="c-paragraph ">
82
- Apply the < code class ="c-code "> .a-alerts</ code > class to enable animation on all alerts within the block.
83
- </ p >
84
-
85
- < h3 class ="c-heading c-heading--small c-text--mono "> .a-alerts__alert</ h3 >
67
+ < h3 class ="c-heading c-heading--small c-text--mono "> animaton</ h3 >
86
68
< p class ="c-paragraph ">
87
69
Will turn on animation per alert.
88
70
</ p >
89
71
90
- < h3 class ="c-heading c-heading--small "> < span class ="c-text--mono "> -- slow, -- fast</ span > </ h3 >
72
+ < h3 class ="c-heading c-heading--small "> < span class ="c-text--mono "> slow, fast</ span > </ h3 >
91
73
< p class ="c-paragraph ">
92
74
Every animation comes with slow and fast modifiers.
93
75
</ p >
94
-
95
- < h3 class ="c-heading c-heading--small c-text--mono "> --top, --bottom, --left, --right</ h3 >
96
- < p class ="c-paragraph ">
97
- Add one of these modifiers to change the origin of the animation. Top will make the animations appear to start from
98
- the top of the alert and so on. Default is from the center of the element.
99
- </ p >
0 commit comments