diff options
Diffstat (limited to '')
-rw-r--r-- | toolkit/content/widgets/moz-message-bar/moz-message-bar.mjs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/toolkit/content/widgets/moz-message-bar/moz-message-bar.mjs b/toolkit/content/widgets/moz-message-bar/moz-message-bar.mjs index d83de5d29f..8f0c997149 100644 --- a/toolkit/content/widgets/moz-message-bar/moz-message-bar.mjs +++ b/toolkit/content/widgets/moz-message-bar/moz-message-bar.mjs @@ -4,6 +4,8 @@ import { html, ifDefined } from "../vendor/lit.all.mjs"; import { MozLitElement } from "../lit-utils.mjs"; +// eslint-disable-next-line import/no-unassigned-import +import "chrome://global/content/elements/moz-button.mjs"; const messageTypeToIconData = { info: { @@ -41,7 +43,7 @@ const messageTypeToIconData = { * @property {string} messageL10nArgs - Any args needed for the message l10n ID. * @fires message-bar:close * Custom event indicating that message bar was closed. - * @fires message-bar:user-dismissed + * @fires message-bar:user-dismissed * Custom event indicating that message bar was dismissed by the user. */ @@ -49,7 +51,7 @@ export default class MozMessageBar extends MozLitElement { static queries = { actionsSlotEl: "slot[name=actions]", actionsEl: ".actions", - closeButtonEl: "button.close", + closeButtonEl: "moz-button.close", supportLinkSlotEl: "slot[name=support-link]", }; @@ -113,14 +115,16 @@ export default class MozMessageBar extends MozLitElement { return ""; } - closeButtonTemplate() { + closeButtonTemplate({ size } = {}) { if (this.dismissable) { return html` - <button - class="close ghost-button" + <moz-button + type="icon ghost" + class="close" + size=${ifDefined(size)} data-l10n-id="moz-message-bar-close-button" @click=${this.dismiss} - ></button> + ></moz-button> `; } return ""; |