@compositive/foundation
Version:
Compositive framework foundation package.
11 lines (8 loc) • 423 B
JavaScript
import { jsx } from 'react/jsx-runtime';
import { isDefined } from '@compositive/commons-predicates';
import { ThemeContext, THEME_NOT_PROVIDED_ERROR } from './ThemeContext.js';
const ThemeConsumer = ({ children, }) => {
return (jsx(ThemeContext.Consumer, { children: (theme) => children(isDefined.validate(theme, THEME_NOT_PROVIDED_ERROR)) }));
};
export { ThemeConsumer };
//# sourceMappingURL=ThemeConsumer.js.map