* Render the `message` property. * @param key - A key to give the element a stable identity. This is used to improve compatibility with screen readers. * @param ariaHidden - If "true" then content will be hidden from screen readers.
(key: string, ariaHidden: 'true' | null = null)
| 658 | * @param ariaHidden - If "true" then content will be hidden from screen readers. |
| 659 | */ |
| 660 | private renderToastMessage(key: string, ariaHidden: 'true' | null = null) { |
| 661 | const { customHTMLEnabled, message } = this; |
| 662 | if (customHTMLEnabled) { |
| 663 | return ( |
| 664 | <div |
| 665 | key={key} |
| 666 | aria-hidden={ariaHidden} |
| 667 | class="toast-message" |
| 668 | part="message" |
| 669 | innerHTML={sanitizeDOMString(message)} |
| 670 | ></div> |
| 671 | ); |
| 672 | } |
| 673 | |
| 674 | return ( |
| 675 | <div key={key} aria-hidden={ariaHidden} class="toast-message" part="message"> |
| 676 | {message} |
| 677 | </div> |
| 678 | ); |
| 679 | } |
| 680 | |
| 681 | /** |
| 682 | * Render the `header` property. |
no test coverage detected