|
1 | 1 | --- |
2 | 2 | title: Alerts |
3 | 3 | minver: 0.1.1 |
| 4 | +also: |
| 5 | + elements/hx-alert: <hx-alert> |
4 | 6 | --- |
5 | 7 | {% extends 'component.njk' %} |
6 | 8 | {% block content %} |
7 | 9 | <section> |
8 | | - <h2 id="default">Default</h2> |
9 | | - |
10 | | - <div class="demo"> |
11 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
12 | | - <div class="hxAlert"> |
13 | | - <div class="hxAlert__icon"> |
14 | | - <hx-icon type="info-circle"></hx-icon> |
15 | | - </div> |
16 | | - <div class="hxAlert__text"> |
17 | | - <span class="hxAlert__status">Info</span> |
18 | | - Here is helpful information. |
19 | | - </div> |
20 | | - <div class="hxAlert__action"> |
21 | | - <a href="#">Acknowledge</a> |
22 | | - </div> |
23 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
24 | | - </div> |
25 | | - </div> |
26 | | - </div> |
27 | | - {% code 'html' %} |
28 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
29 | | - <div class="hxAlert"> |
30 | | - <div class="hxAlert__icon"> |
31 | | - <hx-icon type="info-circle"></hx-icon> |
32 | | - </div> |
33 | | - <div class="hxAlert__text"> |
34 | | - <span class="hxAlert__status">Info</span> |
35 | | - Here is helpful information. |
36 | | - </div> |
37 | | - <div class="hxAlert__action"> |
38 | | - <a href="#">Acknowledge</a> |
39 | | - </div> |
40 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
41 | | - </div> |
42 | | - </div> |
43 | | - {% endcode %} |
44 | | - </section> |
45 | | - |
46 | | - <section> |
47 | | - <h2 id="error">Error</h2> |
48 | | - |
49 | | - <div class="demo"> |
50 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
51 | | - <div class="hxAlert hxAlert--error"> |
52 | | - <div class="hxAlert__icon"> |
53 | | - <hx-icon type="exclamation-circle"></hx-icon> |
54 | | - </div> |
55 | | - <div class="hxAlert__text"> |
56 | | - <span class="hxAlert__status">Error</span> |
57 | | - Change a few things up and try submitting again. |
58 | | - </div> |
59 | | - <div class="hxAlert__action"> |
60 | | - <a href="#">Correct Issue</a> |
61 | | - </div> |
62 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
63 | | - </div> |
64 | | - </div> |
65 | | - </div> |
66 | | - {% code 'html' %} |
67 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
68 | | - <div class="hxAlert hxAlert--error"> |
69 | | - <div class="hxAlert__icon"> |
70 | | - <hx-icon type="exclamation-circle"></hx-icon> |
71 | | - </div> |
72 | | - <div class="hxAlert__text"> |
73 | | - <span class="hxAlert__status">Error</span> |
74 | | - Change a few things up and try submitting again. |
75 | | - </div> |
76 | | - <div class="hxAlert__action"> |
77 | | - <a href="#">Correct Issue</a> |
78 | | - </div> |
79 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
80 | | - </div> |
81 | | - </div> |
82 | | - {% endcode %} |
83 | | - </section> |
84 | | - |
85 | | - <section> |
86 | | - <h2 id="warning">Warning</h2> |
87 | | - |
88 | | - <div class="demo"> |
89 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
90 | | - <div class="hxAlert hxAlert--warning"> |
91 | | - <div class="hxAlert__icon"> |
92 | | - <hx-icon type="exclamation-triangle"></hx-icon> |
93 | | - </div> |
94 | | - <div class="hxAlert__text"> |
95 | | - <span class="hxAlert__status">Warning</span> |
96 | | - Best check yo self, you're not looking too good. |
97 | | - </div> |
98 | | - <div class="hxAlert__action"> |
99 | | - <a href="#">Double Check</a> |
100 | | - </div> |
101 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
102 | | - </div> |
103 | | - </div> |
104 | | - </div> |
105 | | - {% code 'html' %} |
106 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
107 | | - <div class="hxAlert hxAlert--warning"> |
108 | | - <div class="hxAlert__icon"> |
109 | | - <hx-icon type="exclamation-triangle"></hx-icon> |
110 | | - </div> |
111 | | - <div class="hxAlert__text"> |
112 | | - <span class="hxAlert__status">Warning</span> |
113 | | - Best check yo self, you're not looking too good. |
114 | | - </div> |
115 | | - <div class="hxAlert__action"> |
116 | | - <a href="#">Double Check</a> |
117 | | - </div> |
118 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
119 | | - </div> |
120 | | - </div> |
121 | | - {% endcode %} |
122 | | - </section> |
123 | | - |
124 | | - <section> |
125 | | - <h2 id="success">Success</h2> |
126 | | - |
127 | | - <div class="demo"> |
128 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
129 | | - <div class="hxAlert hxAlert--success"> |
130 | | - <div class="hxAlert__icon"> |
131 | | - <hx-icon type="checkmark"></hx-icon> |
132 | | - </div> |
133 | | - <div class="hxAlert__text"> |
134 | | - <span class="hxAlert__status ">Success</span> |
135 | | - You successfully read this important alert message. |
136 | | - </div> |
137 | | - <div class="hxAlert__action"> |
138 | | - <a href="#">Celebrate</a> |
139 | | - </div> |
140 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
141 | | - </div> |
| 10 | + <h2 id="demo">Demo</h2> |
| 11 | + <div id="vue-alertDemo" class="hxRow" v-cloak> |
| 12 | + <div class="hxCol hxSpan-12-xs hxSpan-3-lg hxOrder-2-lg"> |
| 13 | + <h3>Options</h3> |
| 14 | + <p> |
| 15 | + <b>Type:</b><br /> |
| 16 | + <select v-model="type"> |
| 17 | + <option v-for="_type in types" :value="_type"> |
| 18 | + {% raw %}{{ _type.label }}{% endraw %} |
| 19 | + </option> |
| 20 | + </select> |
| 21 | + </p> |
| 22 | + <p> |
| 23 | + <label> |
| 24 | + <input type="checkbox" v-model="isStatic"> |
| 25 | + Static |
| 26 | + </label> |
| 27 | + </p> |
| 28 | + <p> |
| 29 | + <b>Status:</b><br /> |
| 30 | + <input |
| 31 | + class="hxTextCtrl" |
| 32 | + type="text" |
| 33 | + v-model="status" /> |
| 34 | + </p> |
| 35 | + <p> |
| 36 | + <b>CTA:</b><br /> |
| 37 | + <input |
| 38 | + class="hxTextCtrl" |
| 39 | + type="text" |
| 40 | + v-model="cta" /> |
| 41 | + </p> |
| 42 | + <p> |
| 43 | + <b>Content:</b><br /> |
| 44 | + <textarea class="hxTextCtrl" v-model="content"></textarea> |
| 45 | + </p> |
| 46 | + </div> |
| 47 | + <div class="hxCol hxSpan-12-xs hxSpan-9-lg hxOrder-1-lg"> |
| 48 | + <div class="demo alert-demo"> |
| 49 | + <hx-alert |
| 50 | + :type="type.value" |
| 51 | + :status="status" |
| 52 | + :static="isStatic" |
| 53 | + :cta="cta" |
| 54 | + @submit="onSubmit"> |
| 55 | + {% raw %}{{content}}{% endraw %} |
| 56 | + </hx-alert> |
| 57 | + </div> |
| 58 | + <pre>{% raw %}{{snippet}}{% endraw %}</pre> |
142 | 59 | </div> |
143 | 60 | </div> |
144 | | - {% code 'html' %} |
145 | | - <div role="status" class="hxAlerts" aria-live="polite"> |
146 | | - <div class="hxAlert hxAlert--success"> |
147 | | - <div class="hxAlert__icon"> |
148 | | - <hx-icon type="checkmark"></hx-icon> |
149 | | - </div> |
150 | | - <div class="hxAlert__text"> |
151 | | - <span class="hxAlert__status ">Success</span> |
152 | | - You successfully read this important alert message. |
153 | | - </div> |
154 | | - <div class="hxAlert__action"> |
155 | | - <a href="#">Celebrate</a> |
156 | | - </div> |
157 | | - <button class="hxAlert__dismiss"><hx-icon type="times"></hx-icon></button> |
158 | | - </div> |
159 | | - </div> |
160 | | - {% endcode %} |
161 | 61 | </section> |
162 | 62 | {% endblock %} |
0 commit comments