@use-pico/cls
Version:
Type-safe, composable styling system for React, Vue, Svelte, and vanilla JS
9 lines (7 loc) • 301 B
text/typescript
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);
};