braid-design-system
Version:
Themeable design system for the SEEK Group
13 lines (12 loc) • 390 B
JavaScript
const react = require("react");
const BraidThemeContext = react.createContext(null);
const useBraidTheme = () => {
const braidTheme = react.useContext(BraidThemeContext);
if (braidTheme === null) {
throw new Error("No Braid theme available on context");
}
return braidTheme;
};
exports.BraidThemeContext = BraidThemeContext;
exports.useBraidTheme = useBraidTheme;
;