UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

45 lines (44 loc) 1.15 kB
import { defineComponent as r } from "vue"; import t from "../link/NeonLink.vue.es.js"; import i from "../dropdown-menu/NeonDropdownMenu.vue.es.js"; import { NeonFunctionalColor as m } from "../../../model/common/color/NeonFunctionalColor.es.js"; import p from "../../presentation/icon/NeonIcon.vue.es.js"; import { useRoute as c } from "vue-router"; const C = r({ name: "NeonMobileMenu", components: { NeonDropdownMenu: i, NeonLink: t, NeonIcon: p }, props: { /** * The menu configuration. The highlighted 'active' menu is determined by the current Vue route. */ menu: { type: Array, required: !0 }, /** * The menu color. */ color: { type: String, default: m.Brand } }, emits: [ /** * Emitted when a user clicks on a menu item. * @type {string} the key of the menu item clicked. */ "click" ], setup(s, { emit: n }) { const o = c(); return { onClick: (e) => { n("click", e); }, routeMatches: (e) => (o == null ? void 0 : o.path.indexOf(e)) >= 0 }; } }); export { C as default }; //# sourceMappingURL=NeonMobileMenu.es.js.map