@carbon/ibm-products-web-components
Version:
Carbon for IBM Products Web Components
58 lines (56 loc) • 1.98 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import "../../globals/settings.js";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
import page_header_default from "./page-header.scss.js";
import { LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import { carbonElement } from "@carbon/web-components/es/globals/decorators/carbon-element.js";
import { html as html$1, unsafeStatic } from "lit/static-html.js";
//#region src/components/page-header/page-header-content-text.ts
/**
* @license
*
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Page header Content Text.
* @element c4p-page-header-content-text
*/
let CDSPageHeaderContentText = class CDSPageHeaderContentText extends LitElement {
constructor(..._args) {
super(..._args);
this.subtitle = "";
this.subtitleLevel = "h2";
}
render() {
const { subtitle, subtitleLevel } = this;
const subtitleTag = unsafeStatic(subtitleLevel);
return html`
${subtitle && html$1`<${subtitleTag} class="${"c4p"}--page-header__content__subtitle">
${subtitle}
</${subtitleTag}>`}
<slot></slot>
`;
}
static {
this.styles = page_header_default;
}
};
__decorate([property()], CDSPageHeaderContentText.prototype, "subtitle", void 0);
__decorate([property({
type: String,
attribute: "subtitle-level"
})], CDSPageHeaderContentText.prototype, "subtitleLevel", void 0);
CDSPageHeaderContentText = __decorate([carbonElement(`c4p-page-header-content-text`)], CDSPageHeaderContentText);
var page_header_content_text_default = CDSPageHeaderContentText;
//#endregion
export { page_header_content_text_default as default };
//# sourceMappingURL=page-header-content-text.js.map