UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

30 lines (27 loc) 929 B
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { ark } from '../factory.js'; import { useQrCodeContext } from './use-qr-code-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "qr-code-download-trigger", props: { mimeType: {}, quality: {}, fileName: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const qrCode = useQrCodeContext(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).button, mergeProps(unref(qrCode).getDownloadTriggerProps(props), { "as-child": _ctx.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };