UNPKG

@ark-ui/vue

Version:

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

11 lines (8 loc) 295 B
import { provide, inject } from 'vue'; const createContext = (id) => { const contextId = Symbol(id); const provider = (value) => provide(contextId, value); const consumer = (fallback) => inject(contextId, fallback); return [provider, consumer, contextId]; }; export { createContext };