UNPKG

@use-pico/cls

Version:

Type-safe, composable styling system for React, Vue, Svelte, and vanilla JS

9 lines (7 loc) 301 B
import { useContext } from "react"; import type { Contract } from "../types/Contract"; import type { Tweak } from "../types/Tweak"; import { VariantContext } from "./VariantContext"; export const useVariantContext = (): Tweak.Type<Contract.Any>["variant"] => { return useContext(VariantContext); };