UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

68 lines (67 loc) 2.09 kB
import DtButton from "../../../components/button/button.vue.js"; import { DtIconMoreVertical } from "@dialpad/dialtone-icons/vue3"; import { resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, renderSlot } from "vue"; import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js"; const _sfc_main = { compatConfig: { MODE: 3 }, name: "DtRecipeSettingsMenuButton", components: { DtButton, DtIconMoreVertical }, inheritAttrs: false, props: { /** * Determines whether the button should display the update state * default is false * @values true, false */ updateAvailable: { type: Boolean, default: false }, /** * Aria label */ ariaLabel: { type: String, required: true } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_dt_icon_more_vertical = resolveComponent("dt-icon-more-vertical"); const _component_dt_button = resolveComponent("dt-button"); return $props.updateAvailable ? (openBlock(), createBlock(_component_dt_button, mergeProps({ key: 0, importance: "outlined", size: "xs", "icon-position": "right", class: "d-recipe-settings-menu-button-update", "aria-label": $props.ariaLabel }, _ctx.$attrs), { icon: withCtx(() => [ createVNode(_component_dt_icon_more_vertical, { size: "300" }) ]), default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["aria-label"])) : (openBlock(), createBlock(_component_dt_button, mergeProps({ key: 1, importance: "clear", kind: "inverted", class: "d-recipe-settings-menu-button", "aria-label": $props.ariaLabel }, _ctx.$attrs), { icon: withCtx(() => [ createVNode(_component_dt_icon_more_vertical, { size: "300" }) ]), _: 1 }, 16, ["aria-label"])); } const settings_menu_button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { settings_menu_button as default }; //# sourceMappingURL=settings_menu_button.vue.js.map