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
+ @color =" neutral "
220
+ @title =" Neutral: With title and description"
183
221
@description =" Your Intention settings are currently set to default allow. This
184
222
means that this view will show connections to every service in your
185
223
cluster. We recommend changing your Intention settings to default deny and
189
227
<br />
190
228
191
229
<Hds::Alert
192
- @color =" critical "
193
- @title =" Critical! Alert w/ title & description"
230
+ @color =" highlight "
231
+ @title =" Highlight: With title and description"
194
232
@description =" Your Intention settings are currently set to default allow. This
195
233
means that this view will show connections to every service in your
196
234
cluster. We recommend changing your Intention settings to default deny and
199
237
/>
200
238
<br />
201
239
202
- Icon override variation:
203
-
204
240
<Hds::Alert
205
- @color =" critical"
206
- @icon =" meh"
207
- @title =" Critical! With special icon"
241
+ @color =" success"
242
+ @title =" Success: With title and description"
208
243
@description =" Your Intention settings are currently set to default allow. This
209
244
means that this view will show connections to every service in your
210
245
cluster. We recommend changing your Intention settings to default deny and
213
248
/>
214
249
<br />
215
250
216
- Title/description variations:
217
-
218
- <Hds::Alert @color =" success" @description =" Description only please" />
219
- <br />
220
-
221
251
<Hds::Alert
222
- @color =" success"
223
- @title =" Really long title, yet no description. Your Intention settings are currently set to default allow. This
252
+ @color =" warning"
253
+ @title =" Warning: With title and description"
254
+ @description =" Your Intention settings are currently set to default allow. This
224
255
means that this view will show connections to every service in your
225
256
cluster. We recommend changing your Intention settings to default deny and
226
257
creating specific Intentions for upstream and downstream services for this
229
260
<br />
230
261
231
262
<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
263
+ @color =" critical "
264
+ @title =" Critical: With title and description "
265
+ @description =" Your Intention settings are currently set to default allow. This
235
266
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
267
+ cluster. We recommend changing your Intention settings to default deny and
237
268
creating specific Intentions for upstream and downstream services for this
238
- view to be useful. For more info, see <a href='#'>About clusters</a>. "
269
+ view to be useful."
239
270
/>
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 >
271
+ <br />
248
272
</section >
249
273
250
274
<section >
255
279
has
256
280
<code class =" dummy-code" >role="alert"</code >
257
281
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.
282
+ <code class =" dummy-code" >div</code >, to identify the element as the container where alert content will be added or
283
+ updated.
259
284
</p >
260
285
<p >References:</p >
261
286
<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 >
287
+ <li >
288
+ <a href =" https://www.w3.org/TR/wai-aria-practices-1.2/#alert" target =" _blank" rel =" noopener noreferrer" >
289
+ WAI-ARIA Authoring Practices 1.2, Alert
290
+ </a >
291
+ </li >
292
+ <li >
293
+ <a
294
+ href =" https://www.w3.org/TR/wai-aria-practices-1.2/examples/alert/alert.html"
295
+ target =" _blank"
296
+ rel =" noopener noreferrer"
297
+ >
298
+ WAI-ARIA Authoring Practices 1.2, Alert Example
299
+ </a >
300
+ </li >
264
301
</ul >
265
302
</section >
0 commit comments