|
5 | 5 | * LICENSE file in the root directory of this source tree. |
6 | 6 | */ |
7 | 7 |
|
8 | | -import { html, svg } from 'lit'; |
| 8 | +import { html } from 'lit'; |
9 | 9 | import { property } from 'lit/decorators.js'; |
10 | 10 | import { prefix } from '../../globals/settings'; |
11 | 11 | import { carbonElement as customElement } from '../../globals/decorators/carbon-element'; |
12 | | -import CDSActionableNotification from './actionable-notification'; |
13 | | -import { iconsForKinds } from './actionable-notification'; |
| 12 | +import { iconLoader } from '../../globals/internal/icon-loader'; |
| 13 | +import CDSActionableNotification, { |
| 14 | + iconsForKinds, |
| 15 | +} from './actionable-notification'; |
14 | 16 | import { NOTIFICATION_KIND } from './defs'; |
15 | 17 | import styles from './actionable-notification.scss?lit'; |
16 | 18 |
|
@@ -38,15 +40,13 @@ class CDSCalloutNotification extends CDSActionableNotification { |
38 | 40 |
|
39 | 41 | protected _renderIcon() { |
40 | 42 | const { statusIconDescription, kind } = this; |
41 | | - const { [kind]: icon } = iconsForKinds; |
42 | | - return !icon |
43 | | - ? undefined |
44 | | - : icon({ |
| 43 | + const IconComponent = iconsForKinds[kind]; |
| 44 | + return IconComponent |
| 45 | + ? iconLoader(IconComponent, { |
45 | 46 | class: `${prefix}--inline-notification__icon`, |
46 | | - children: !statusIconDescription |
47 | | - ? undefined |
48 | | - : svg`<title>${statusIconDescription}</title>`, |
49 | | - }); |
| 47 | + 'aria-label': statusIconDescription || undefined, |
| 48 | + }) |
| 49 | + : undefined; |
50 | 50 | } |
51 | 51 |
|
52 | 52 | protected _renderText() { |
|
0 commit comments