UNPKG

react-native-unistyles

Version:
24 lines 601 B
import React from 'react'; import { useSharedContext } from './hooks/useSharedContext'; export const UnistylesContext = /*#__PURE__*/React.createContext(undefined); export const UnistylesProvider = ({ children }) => { const { plugins, theme, layout } = useSharedContext({ // intentionally false, we want to listen for changes in the provider useContext: false, deps: [] }); return /*#__PURE__*/React.createElement(UnistylesContext.Provider, { value: { theme, layout, plugins } }, children); }; //# sourceMappingURL=UnistylesProvider.js.map