43
43
results in a default
44
44
<code class =" dummy-code" >icon</code >, which
45
45
<strong >can</strong >
46
- be overriden.
46
+ be overriden. Required parameter.
47
47
</p >
48
48
<p >Acceptable values:</p >
49
49
<ol >
90
90
is required.</p >
91
91
</dd >
92
92
93
- <dt >isDismissible <code >boolean</code ></dt >
93
+ <dt >🚧 isDismissible <code >boolean</code ></dt >
94
94
<p >The alert can be dismissed by the user. This parameter has some accessibility considerations for
95
95
<code class =" dummy-code" >Hds::Alert::Toast</code >
96
96
(<code class =" dummy-code" >role="alertdialog"</code >).
103
103
</ol >
104
104
</dd >
105
105
106
- <dt >hasActions <code >boolean</code ></dt >
106
+ <dt >🚧 hasActions <code >boolean</code ></dt >
107
107
<dd >
108
108
<p >The alert has content below the
109
109
<code class =" dummy-code" >title</code >
128
128
</section >
129
129
130
130
<section >
131
+ <h3 class =" dummy-h3" >🚧 How to use</h3 >
132
+ <p class =" dummy-paragraph" >
133
+ Basic invocation of the component (calling
134
+ <code class =" dummy-code" >Hds::Alert</code >
135
+ temporarily, instead of
136
+ <code class =" dummy-code" >Hds::Alert::Page</code >):
137
+ </p >
138
+ {{! prettier-ignore-start }}
139
+ <CodeBlock
140
+ @language =" markup"
141
+ @code ='
142
+ <Hds::Alert @title="Title here" @description="Description here" />
143
+ '
144
+ />
145
+ {{! prettier-ignore-end }}
131
146
147
+ <p class =" dummy-paragraph" >Renders to:</p >
148
+ <Hds::Alert @title =" Really cool title here" @description =" And a rad description too!" />
132
149
</section >
133
150
134
151
<section >
135
- <h3 class =" dummy-h3" >How to use</h3 >
136
- </section >
137
-
138
- <section >
139
- <h3 class =" dummy-h3" >Design guidelines</h3 >
152
+ <h3 class =" dummy-h3" >🚧 Design guidelines</h3 >
153
+ <Hds::Alert @color =" critical" @title =" TODO: Insert Figma stickersheet here" />
140
154
</section >
141
155
142
156
<section data-test-percy>
143
157
<h3 class =" dummy-h3" >Showcase</h3 >
144
158
145
- Color variations:
159
+ <h4 class =" dummy-h4" >Content</h4 >
160
+
161
+ <h5 class =" dummy-h5" >
162
+ <code class =" dummy-code" >title</code >
163
+ and
164
+ <code class =" dummy-code" >description</code >
165
+ variations
166
+ </h5 >
167
+
168
+ <Hds::Alert @color =" success" @description =" Success: No title, description only" />
169
+ <br />
146
170
147
171
<Hds::Alert
148
- @color =" neutral"
149
- @title =" Neutral! Alert w/title & description"
150
- @description =" Your Intention settings are currently set to default allow. This
172
+ @color =" success"
173
+ @title =" Success: Really long title, yet no description below. Your Intention settings are currently set to default allow. This
151
174
means that this view will show connections to every service in your
152
175
cluster. We recommend changing your Intention settings to default deny and
153
176
creating specific Intentions for upstream and downstream services for this
156
179
<br />
157
180
158
181
<Hds::Alert
159
- @color =" highlight"
160
- @title =" Highlight! Alert w/title & description"
182
+ @color =" success"
183
+ @title =" Success: with rich text description (description below has HTML e.g. <strong>, <code>, <a>)"
184
+ @description =" Your Intention settings are currently set to default <strong>allow</strong>. This
185
+ means that this view will show connections to every service in your
186
+ <code>cluster</code>. We recommend changing your Intention settings to default deny and
187
+ creating specific Intentions for upstream and downstream services for this
188
+ view to be useful. For more info, see <a href='#'>About clusters</a>."
189
+ />
190
+
191
+ <h5 class =" dummy-h5" ><code class =" dummy-code" >icon</code > override variation</h5 >
192
+
193
+ <Hds::Alert
194
+ @color =" critical"
195
+ @title =" Critical: With default icon"
161
196
@description =" Your Intention settings are currently set to default allow. This
162
197
means that this view will show connections to every service in your
163
198
cluster. We recommend changing your Intention settings to default deny and
167
202
<br />
168
203
169
204
<Hds::Alert
170
- @color =" success"
171
- @title =" Success! Alert w/title & description"
205
+ @color =" critical"
206
+ @icon =" meh"
207
+ @title =" Critical: With override icon of your choice"
172
208
@description =" Your Intention settings are currently set to default allow. This
173
209
means that this view will show connections to every service in your
174
210
cluster. We recommend changing your Intention settings to default deny and
177
213
/>
178
214
<br />
179
215
216
+ <h4 class =" dummy-h4" >Color</h4 >
217
+
180
218
<Hds::Alert
181
- @color =" warning"
182
- @title =" Warning! Alert w/title & description"
219
+ @title =" Neutral: With title and description"
183
220
@description =" Your Intention settings are currently set to default allow. This
184
221
means that this view will show connections to every service in your
185
222
cluster. We recommend changing your Intention settings to default deny and
189
226
<br />
190
227
191
228
<Hds::Alert
192
- @color =" critical "
193
- @title =" Critical! Alert w/ title & description"
229
+ @color =" highlight "
230
+ @title =" Highlight: With title and description"
194
231
@description =" Your Intention settings are currently set to default allow. This
195
232
means that this view will show connections to every service in your
196
233
cluster. We recommend changing your Intention settings to default deny and
199
236
/>
200
237
<br />
201
238
202
- Icon override variation:
203
-
204
239
<Hds::Alert
205
- @color =" critical"
206
- @icon =" meh"
207
- @title =" Critical! With special icon"
240
+ @color =" success"
241
+ @title =" Success: With title and description"
208
242
@description =" Your Intention settings are currently set to default allow. This
209
243
means that this view will show connections to every service in your
210
244
cluster. We recommend changing your Intention settings to default deny and
213
247
/>
214
248
<br />
215
249
216
- Title/description variations:
217
-
218
- <Hds::Alert @color =" success" @description =" Description only please" />
219
- <br />
220
-
221
250
<Hds::Alert
222
- @color =" success"
223
- @title =" Really long title, yet no description. Your Intention settings are currently set to default allow. This
251
+ @color =" warning"
252
+ @title =" Warning: With title and description"
253
+ @description =" Your Intention settings are currently set to default allow. This
224
254
means that this view will show connections to every service in your
225
255
cluster. We recommend changing your Intention settings to default deny and
226
256
creating specific Intentions for upstream and downstream services for this
229
259
<br />
230
260
231
261
<Hds::Alert
232
- @color =" success "
233
- @title =" Description below has HTML "
234
- @description =" Your Intention settings are currently set to default <strong> allow</strong> . This
262
+ @color =" critical "
263
+ @title =" Critical: With title and description "
264
+ @description =" Your Intention settings are currently set to default allow. This
235
265
means that this view will show connections to every service in your
236
- <code> cluster</code> . We recommend changing your Intention settings to default deny and
266
+ cluster. We recommend changing your Intention settings to default deny and
237
267
creating specific Intentions for upstream and downstream services for this
238
- view to be useful. For more info, see <a href='#'>About clusters</a>. "
268
+ view to be useful."
239
269
/>
240
-
241
- <h4 class =" dummy-h4" >Content</h4 >
242
-
243
- <h4 class =" dummy-h4" >Size</h4 >
244
-
245
- <h4 class =" dummy-h4" >Type</h4 >
246
-
247
- <h4 class =" dummy-h4" >Color:</h4 >
270
+ <br />
248
271
</section >
249
272
250
273
<section >
255
278
has
256
279
<code class =" dummy-code" >role="alert"</code >
257
280
on the parent
258
- <code class =" dummy-code" >div</code >, to identify the element as the container where alert content will be added or updated.
281
+ <code class =" dummy-code" >div</code >, to identify the element as the container where alert content will be added or
282
+ updated.
259
283
</p >
260
284
<p >References:</p >
261
285
<ul >
262
- <li ><a href =" https://www.w3.org/TR/wai-aria-practices-1.2/#alert" >WAI-ARIA Authoring Practices 1.2, Alert</a ></li >
263
- <li ><a href =" https://www.w3.org/TR/wai-aria-practices-1.2/examples/alert/alert.html" >WAI-ARIA Authoring Practices 1.2, Alert Example</a ></li >
286
+ <li >
287
+ <a href =" https://www.w3.org/TR/wai-aria-practices-1.2/#alert" target =" _blank" rel =" noopener noreferrer" >
288
+ WAI-ARIA Authoring Practices 1.2, Alert
289
+ </a >
290
+ </li >
291
+ <li >
292
+ <a
293
+ href =" https://www.w3.org/TR/wai-aria-practices-1.2/examples/alert/alert.html"
294
+ target =" _blank"
295
+ rel =" noopener noreferrer"
296
+ >
297
+ WAI-ARIA Authoring Practices 1.2, Alert Example
298
+ </a >
299
+ </li >
264
300
</ul >
265
301
</section >
0 commit comments