@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
30 lines (27 loc) • 1.01 kB
JavaScript
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
import { ark } from '../factory.js';
import { useFileUploadContext } from './use-file-upload-context.js';
import { useForwardExpose } from '../../utils/use-forward-expose.js';
import { FileUploadItemPropsProvider } from './use-file-upload-item-props-context.js';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "file-upload-item",
props: {
file: {},
asChild: { type: Boolean }
},
setup(__props) {
const props = __props;
const fileUpload = useFileUploadContext();
FileUploadItemPropsProvider(props);
useForwardExpose();
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ark).li, mergeProps(unref(fileUpload).getItemProps(props), { "as-child": _ctx.asChild }), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
export { _sfc_main as default };