UNPKG

@shopware-ag/meteor-component-library

Version:

The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).

84 lines (83 loc) 2.33 kB
import mtPopoverItem from "./MtPopoverItem.js"; import { defineComponent, resolveComponent, openBlock, createBlock } from "vue"; import { _ as _export_sfc } from "../_plugin-vue_export-helper-cc2b3d55.mjs"; import "./MtCheckbox.js"; import "../mt-icon.vue_vue_type_style_index_0_lang-2cc5f73e.mjs"; import "../mt-base-field-7a978dcf.mjs"; import "./MtInheritanceSwitch.js"; import "./MtTooltip.js"; import "../floating-ui.vue-fe27ebef.mjs"; import "../floating-ui.dom-f450fda4.mjs"; import "../useIsInsideTooltip-0c3bd290.mjs"; import "../index-221bad05.mjs"; import "vue-i18n"; import "./MtFieldCopyable.js"; import "../tooltip.directive-a5042569.mjs"; import "../id-1e5b8276.mjs"; import "./MtHelpText.js"; import "../useFutureFlags-2be3e179.mjs"; import "./MtFieldError.js"; import "./MtText.js"; import "../mt-switch.vue_vue_type_style_index_0_lang-e05ec27a.mjs"; import "./MtFieldLabel.js"; const _sfc_main = defineComponent({ name: "MtContextMenuItem", components: { "mt-popover-item": mtPopoverItem }, props: { label: { type: String, required: true }, icon: { type: String, required: false, default: null }, disabled: { type: Boolean, required: false, default: false }, type: { type: String, required: false, default: "default" }, role: { type: String, required: false, default: "menuitem" } }, emits: ["click"], setup(props, { emit }) { const handleLabelClick = (e) => { if (props.disabled) { return; } emit("click", e); }; return { handleLabelClick }; } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_mt_popover_item = resolveComponent("mt-popover-item"); return openBlock(), createBlock(_component_mt_popover_item, { class: "mt-context-menu-item", label: _ctx.label, icon: _ctx.icon, disabled: _ctx.disabled, "on-label-click": _ctx.handleLabelClick, type: _ctx.type, role: _ctx.role }, null, 8, ["label", "icon", "disabled", "on-label-click", "type", "role"]); } const MtContextMenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { MtContextMenuItem as default }; //# sourceMappingURL=MtContextMenuItem.js.map