@dialpad/dialtone
Version:
Dialpad's Dialtone design system monorepo
35 lines (34 loc) • 1.17 kB
JavaScript
import { NodeViewWrapper, nodeViewProps } from "@tiptap/vue-3";
import { resolveComponent, openBlock, createBlock, withCtx, createTextVNode, toDisplayString } from "vue";
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
const _sfc_main = {
compatConfig: { MODE: 3 },
name: "SlashCommandsComponent",
components: {
NodeViewWrapper
},
props: nodeViewProps,
emits: ["selected-command"],
computed: {
text() {
return "/" + this.$props.node.attrs.command;
}
},
created() {
this.$parent.$emit("selected-command", this.$props.node.attrs.command);
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_node_view_wrapper = resolveComponent("node-view-wrapper");
return openBlock(), createBlock(_component_node_view_wrapper, { class: "d-d-inline-block" }, {
default: withCtx(() => [
createTextVNode(toDisplayString($options.text), 1)
]),
_: 1
});
}
const SlashCommandComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
SlashCommandComponent as default
};
//# sourceMappingURL=SlashCommandComponent.vue.js.map