UNPKG

@nexara/nativeflow

Version:

Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.

17 lines (16 loc) 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); var _NativeProvider = require("../components/Provider/NativeProvider.js"); const useTheme = (isTrackTheme = true) => { const context = isTrackTheme ? (0, _react.useContext)(_NativeProvider.Context)?.theme : undefined; if (isTrackTheme && !context) { throw new Error('Ensure that your code is wrapped with NativeProvider in App.js, and make sure you are not using the useTheme hook outside of the NativeProvider.'); } return context; }; var _default = exports.default = useTheme; //# sourceMappingURL=useTheme.js.map