import { Component, ComponentInterface, Prop } from '@stencil/core'; import { Color, Config, Mode } from '../../interface'; @Component({ tag: 'ion-menu-button', styleUrls: { ios: 'menu-button.ios.scss', md: 'menu-button.md.scss' }, shadow: true }) export class MenuButton implements ComponentInterface { @Prop({ context: 'config' }) config!: Config; /** * The color to use from your application's color palette. * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. * For more information on colors, see [theming](/docs/theming/basics). */ @Prop() color?: Color; /** * The mode determines which platform styles to use. */ @Prop() mode!: Mode; /** * Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle */ @Prop() menu?: string; /** * Automatically hides the menu button when the corresponding menu is not active */ @Prop() autoHide = true; hostData() { return { 'ion-activatable': true, class: { // ion-buttons target .button 'button': true } }; } render() { const menuIcon = this.config.get('menuIcon', 'menu'); return ( ); } }