UNPKG

@ark-ui/vue

Version:

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

15 lines (14 loc) 347 B
import { inject, provide } from "vue"; //#region src/utils/create-context.ts var createContext = (id) => { const contextId = Symbol(id); const provider = (value) => provide(contextId, value); const consumer = (fallback) => inject(contextId, fallback); return [ provider, consumer, contextId ]; }; //#endregion export { createContext };