2026-08-15 05:55:55 +00:00
|
|
|
// Module ID: 1572
|
|
|
|
|
// Function ID: 1573
|
2026-08-06 08:05:19 +00:00
|
|
|
// Name: useTheme
|
2026-08-15 05:55:55 +00:00
|
|
|
// Dependencies: [19, 1537]
|
2026-08-06 08:05:19 +00:00
|
|
|
// Exports: useTheme
|
|
|
|
|
|
2026-08-15 05:55:55 +00:00
|
|
|
// Module 1572 (useTheme)
|
2026-08-24 06:08:38 +00:00
|
|
|
import context2 from "context" /* 1537 */;
|
|
|
|
|
import closure_2 from "noop" /* 19 */;
|
2026-08-06 08:05:19 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
2026-08-06 08:05:19 +00:00
|
|
|
|
|
|
|
|
export const useTheme = function useTheme() {
|
2026-08-24 06:08:38 +00:00
|
|
|
const context = React.useContext(context2.ThemeContext);
|
2026-08-06 08:05:19 +00:00
|
|
|
if (null == context) {
|
|
|
|
|
const _Error = Error;
|
2026-08-24 06:08:38 +00:00
|
|
|
error = new Error("Couldn't find a theme. Is your component inside NavigationContainer or does it have a theme?");
|
2026-08-06 08:05:19 +00:00
|
|
|
throw error;
|
|
|
|
|
} else {
|
|
|
|
|
return context;
|
|
|
|
|
}
|
|
|
|
|
};
|