@nexara/nativeflow
Version:
Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.
13 lines (12 loc) • 525 B
JavaScript
import { useContext } from 'react';
import { Context } from "../components/Provider/NativeProvider.js";
const useTheme = (isTrackTheme = true) => {
const context = isTrackTheme ? useContext(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;
};
export default useTheme;
//# sourceMappingURL=useTheme.js.map
;