UNPKG

@hashicorp/design-system-components

Version:
29 lines (24 loc) 1.03 kB
import Component from '@glimmer/component'; import { service } from '@ember/service'; import { precompileTemplate } from '@ember/template-compilation'; import { g, i } from 'decorator-transforms/runtime'; import { setComponentTemplate } from '@ember/component'; var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<button class=\"hds-dismiss-button\" type=\"button\" aria-label={{this.ariaLabel}} ...attributes>\n <Hds::Icon @name=\"x\" @size=\"16\" />\n</button>"); /** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ class HdsDismissButton extends Component { static { g(this.prototype, "hdsIntl", [service]); } #hdsIntl = (i(this, "hdsIntl"), void 0); get ariaLabel() { return this.args.ariaLabel ?? this.hdsIntl.t('hds.components.dismiss-button.aria-label', { default: 'Dismiss' }); } } setComponentTemplate(TEMPLATE, HdsDismissButton); export { HdsDismissButton as default }; //# sourceMappingURL=index.js.map