UNPKG

@ark-ui/vue

Version:

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

28 lines (25 loc) 919 B
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString } from 'vue'; import { ark } from '../factory.js'; import { useTimerContext } from './use-timer-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "timer-item", props: { type: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const timer = useTimerContext(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(timer).getItemProps(props), { "as-child": _ctx.asChild }), { default: withCtx(() => [ createTextVNode(toDisplayString(unref(timer).formattedTime[props.type]), 1) ]), _: 1 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };