@huluvu424242/honey-slideshow
Version:
Text to Speech component wich is reading texts from DOM elements.
44 lines (40 loc) • 1.57 kB
JavaScript
import { r as registerInstance, h, H as Host } from './index-a2883912.js';
import './helpers-29d709d1.js';
import './animation-3082c5ee.js';
import './hardware-back-button-b3b61715.js';
import { g as getIonMode } from './ionic-global-c170bb31.js';
import { m as menuController } from './index-acd435ec.js';
import { u as updateVisibility } from './menu-toggle-util-a1a0366a.js';
const menuToggleCss = ":host(.menu-toggle-hidden){display:none}";
const MenuToggle = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.visible = false;
/**
* Automatically hides the content when the corresponding menu is not active.
*
* By default, it's `true`. Change it to `false` in order to
* keep `ion-menu-toggle` always visible regardless the state of the menu.
*/
this.autoHide = true;
this.onClick = () => {
return menuController.toggle(this.menu);
};
}
connectedCallback() {
this.visibilityChanged();
}
async visibilityChanged() {
this.visible = await updateVisibility(this.menu);
}
render() {
const mode = getIonMode(this);
const hidden = this.autoHide && !this.visible;
return (h(Host, { onClick: this.onClick, "aria-hidden": hidden ? 'true' : null, class: {
[mode]: true,
'menu-toggle-hidden': hidden,
} }, h("slot", null)));
}
};
MenuToggle.style = menuToggleCss;
export { MenuToggle as ion_menu_toggle };