@scania/tegel
Version:
Tegel Design System
31 lines (25 loc) • 1.69 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-ca8040ad.js');
const inheritAriaAttributes = require('./inheritAriaAttributes-dedbbc57.js');
require('./inheritAttributes-ff9ad737.js');
const headerHamburgerCss = ":host{color:var(--tds-white)}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:background 0.2s ease-in-out, color 0.2s ease-in-out}@media screen and (min-width: 992px){:host tds-header-item{display:none}:host([persistent]) tds-header-item{display:block}}";
const TdsHeaderHamburgerStyle0 = headerHamburgerCss;
const TdsHeaderHamburger = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.tdsAriaLabel = undefined;
}
connectedCallback() {
if (!this.tdsAriaLabel) {
console.warn('Tegel Header Hamburger component: missing tdsAriaLabel prop');
}
}
render() {
const inheritedButtonProps = Object.assign({}, inheritAriaAttributes.inheritAriaAttributes(this.host));
return (index.h(index.Host, { key: '5ea87f94483c167f580c26c7914a22cb6caea885' }, index.h("tds-header-item", { key: 'f2792ffbd859c263165b95b7d2cd9d1c76509c8f' }, index.h("button", Object.assign({ key: 'd1c44fcf5b7bb9c3cefbbbf09e3217704770f761' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), index.h("tds-icon", { key: '62ec94113557c7032a3145ad4b6ac22d39d6453c', class: "icon", name: "burger", size: "20px" })))));
}
get host() { return index.getElement(this); }
};
TdsHeaderHamburger.style = TdsHeaderHamburgerStyle0;
exports.tds_header_hamburger = TdsHeaderHamburger;