Skip to content

Commit bf4140f

Browse files
committed
feat(Alert): change default alert variant to default
1 parent ae774a2 commit bf4140f

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

packages/react-core/src/components/Alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'actio
3737
}
3838

3939
const Alert: React.FunctionComponent<AlertProps & InjectedOuiaProps> = ({
40-
variant = AlertVariant.info,
40+
variant = AlertVariant.default,
4141
isInline = false,
4242
isLiveRegion = false,
4343
variantLabel = `${capitalize(variant)} alert:`,

packages/react-core/src/components/Alert/__tests__/Alert.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import { Alert, AlertVariant } from '../Alert';
55
import { AlertActionLink } from '../AlertActionLink';
66
import { AlertActionCloseButton } from '../AlertActionCloseButton';
77

8-
test('default Alert variant is info', () => {
8+
test('default Alert variant is default', () => {
99
const view = mount(<Alert title="this is a test">Alert testing</Alert>);
1010
expect(
1111
view
1212
.find('Alert')
1313
.childAt(0)
1414
.prop('className')
15-
).toContain('pf-m-info');
15+
).toContain('pf-c-alert');
1616
});
1717

1818
Object.values(AlertVariant).forEach(variant => {

packages/react-core/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ exports[`alertgroup closes when alerts are closed 1`] = `
295295
<li>
296296
<div
297297
aria-atomic="false"
298-
aria-label="Info Alert"
298+
aria-label="Default Alert"
299299
aria-live="polite"
300-
class="pf-c-alert pf-m-info"
300+
class="pf-c-alert"
301301
>
302302
<div
303303
class="pf-c-alert__icon"
@@ -308,11 +308,11 @@ exports[`alertgroup closes when alerts are closed 1`] = `
308308
height="1em"
309309
role="img"
310310
style="vertical-align: -0.125em;"
311-
viewBox="0 0 512 512"
311+
viewBox="0 0 448 512"
312312
width="1em"
313313
>
314314
<path
315-
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"
315+
d="M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"
316316
transform=""
317317
/>
318318
</svg>
@@ -323,7 +323,7 @@ exports[`alertgroup closes when alerts are closed 1`] = `
323323
<span
324324
class="pf-u-screen-reader"
325325
>
326-
Info alert:
326+
Default alert:
327327
</span>
328328
Test Alert
329329
</h4>
@@ -369,9 +369,9 @@ exports[`alertgroup closes when alerts are closed 1`] = `
369369
<li>
370370
<div
371371
aria-atomic="false"
372-
aria-label="Info Alert"
372+
aria-label="Default Alert"
373373
aria-live="polite"
374-
class="pf-c-alert pf-m-info"
374+
class="pf-c-alert"
375375
>
376376
<div
377377
class="pf-c-alert__icon"
@@ -382,11 +382,11 @@ exports[`alertgroup closes when alerts are closed 1`] = `
382382
height="1em"
383383
role="img"
384384
style="vertical-align: -0.125em;"
385-
viewBox="0 0 512 512"
385+
viewBox="0 0 448 512"
386386
width="1em"
387387
>
388388
<path
389-
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"
389+
d="M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"
390390
transform=""
391391
/>
392392
</svg>
@@ -397,7 +397,7 @@ exports[`alertgroup closes when alerts are closed 1`] = `
397397
<span
398398
class="pf-u-screen-reader"
399399
>
400-
Info alert:
400+
Default alert:
401401
</span>
402402
Test Alert
403403
</h4>
@@ -484,17 +484,17 @@ exports[`alertgroup closes when alerts are closed 1`] = `
484484
>
485485
<div
486486
aria-atomic="false"
487-
aria-label="Info Alert"
487+
aria-label="Default Alert"
488488
aria-live="polite"
489-
className="pf-c-alert pf-m-info"
489+
className="pf-c-alert"
490490
>
491491
<AlertIcon
492-
variant="info"
492+
variant="default"
493493
>
494494
<div
495495
className="pf-c-alert__icon"
496496
>
497-
<InfoCircleIcon
497+
<BellIcon
498498
color="currentColor"
499499
noVerticalAlign={false}
500500
size="sm"
@@ -511,15 +511,15 @@ exports[`alertgroup closes when alerts are closed 1`] = `
511511
"verticalAlign": "-0.125em",
512512
}
513513
}
514-
viewBox="0 0 512 512"
514+
viewBox="0 0 448 512"
515515
width="1em"
516516
>
517517
<path
518-
d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"
518+
d="M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z"
519519
transform=""
520520
/>
521521
</svg>
522-
</InfoCircleIcon>
522+
</BellIcon>
523523
</div>
524524
</AlertIcon>
525525
<h4
@@ -528,7 +528,7 @@ exports[`alertgroup closes when alerts are closed 1`] = `
528528
<span
529529
className="pf-u-screen-reader"
530530
>
531-
Info alert:
531+
Default alert:
532532
</span>
533533
Test Alert
534534
</h4>
@@ -539,7 +539,7 @@ exports[`alertgroup closes when alerts are closed 1`] = `
539539
aria-label="Close"
540540
onClose={[MockFunction]}
541541
title="Test Alert"
542-
variantLabel="Info alert:"
542+
variantLabel="Default alert:"
543543
>
544544
<Component
545545
aria-label="Close"

0 commit comments

Comments
 (0)