UNPKG

@hashicorp/design-system-components

Version:
27 lines (24 loc) 1.05 kB
import Component from '@glimmer/component'; import { element } from 'ember-element-helper'; import { HdsAlertTitleTagValues } from './types.js'; import { precompileTemplate } from '@ember/template-compilation'; import { setComponentTemplate } from '@ember/component'; /** * Copyright IBM Corp. 2021, 2025 * SPDX-License-Identifier: MPL-2.0 */ class HdsAlertTitle extends Component { get componentTag() { return this.args.tag ?? HdsAlertTitleTagValues.Div; } static { setComponentTemplate(precompileTemplate("{{!-- IMPORTANT: we removed any extra newlines before/after the let to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/1652) --}}\n{{#let (element this.componentTag) as |Tag|}}<Tag class=\"hds-alert__title hds-typography-body-200 hds-font-weight-semibold\" ...attributes>\n {{yield}}\n </Tag>{{/let}}", { strictMode: true, scope: () => ({ element }) }), this); } } export { HdsAlertTitle as default }; //# sourceMappingURL=title.js.map