UNPKG

@scania/tegel

Version:
24 lines (20 loc) 1.53 kB
import { r as registerInstance, h, H as Host, a as getElement } from './index-9xxNGlso.js'; import { i as inheritAriaAttributes } from './inheritAriaAttributes-DyLhgCIg.js'; import './inheritAttributes-CF8bH08v.js'; const headerLauncherButtonCss = () => `:host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}`; const TdsHeaderLauncherButton = class { constructor(hostRef) { registerInstance(this, hostRef); /** If the button should appear active. Can be used when the button is * triggering a dropdown, and the dropdown is open, for example. */ this.active = false; } render() { this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes(this.host)); const buttonProps = Object.assign({}, this.ariaAttributes); return (h(Host, { key: 'b8f411243958b59899d67a8d991a1ffca34a82d0' }, h("tds-header-item", { key: '025b3aa6d6eee7f9cdb6c19cc672ab9df149741e', active: this.active }, h("button", Object.assign({ key: '7571c417caba3e5a472f58a893f6033c4102ae09' }, buttonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: 'f6477e6f48ca3eb5550f92123f0edc90a3f4e108', class: "icon", name: "bento", size: "20px", "svg-title": this.tdsAriaLabel }))))); } get host() { return getElement(this); } }; TdsHeaderLauncherButton.style = headerLauncherButtonCss(); export { TdsHeaderLauncherButton as tds_header_launcher_button };