@vladsolomon/tdot
Version:
Minimal runtime-configurable typography system for React + Tailwind
13 lines • 338 B
JavaScript
import React, { createContext, useContext } from "react";
const TdotContext = /*#__PURE__*/createContext({});
export function TdotProvider({
config,
children
}) {
return /*#__PURE__*/React.createElement(TdotContext.Provider, {
value: config
}, children);
}
export function useTdotConfig() {
return useContext(TdotContext);
}