@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
28 lines (25 loc) • 1.02 kB
JavaScript
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
import { ark } from '../factory.js';
import { useColorPickerAreaPropsContext } from './use-color-picker-area-props-context.js';
import { useColorPickerContext } from './use-color-picker-context.js';
import { useForwardExpose } from '../../utils/use-forward-expose.js';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "color-picker-area-thumb",
props: {
asChild: { type: Boolean }
},
setup(__props) {
const colorPicker = useColorPickerContext();
const areaProps = useColorPickerAreaPropsContext();
useForwardExpose();
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ark).div, mergeProps(unref(colorPicker).getAreaThumbProps(unref(areaProps)), { "as-child": _ctx.asChild }), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
export { _sfc_main as default };