UNPKG

@varlet/ui

Version:

A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.

16 lines (15 loc) 409 B
import { assert } from "@varlet/shared"; import { useParent } from "@varlet/use"; import { STEPS_BIND_STEP_KEY } from "../steps/provide.mjs"; function useSteps() { const { parentProvider, index, bindParent } = useParent(STEPS_BIND_STEP_KEY); assert(!!bindParent, "Steps", "<step/> must in <steps>"); return { index, steps: parentProvider, bindSteps: bindParent }; } export { useSteps };