UNPKG

recastui

Version:

Solidjs components library focused on usability, whitelabel theming, accessibility and developer experience

23 lines (18 loc) 409 B
import { createContext, createComponent, useContext } from 'solid-js'; const ThemeContext = createContext(); function ThemeProvider(_ref) { let { theme, children } = _ref; return createComponent(ThemeContext.Provider, { value: theme, get children() { return children; } }); } function useTheme() { return useContext(ThemeContext); } export { ThemeProvider, useTheme };