Files
discord-decomp/_bundle/Module3912.jsx
T
2026-11-01 12:12:55 +02:00

45 lines
1.0 KiB
React

// Metro module 3912 (f3913).
import { createContext, useContext } from "react";
const r21 = {
theme: "light",
primaryColor: null,
secondaryColor: null,
gradient: null,
flags: 0,
contrast: 1,
saturation: 1,
density: "compact",
disableAdaptiveTheme: false,
reduceAdaptiveTheme: false
};
const r25 = {
...r21,
key: JSON.stringify(r21)
};
const context = createContext(r25);
export function createThemedContext(a0) {
return {
...a0,
key: JSON.stringify(a0)
};
}
export function useThemeContext() {
const context2 = useContext(context);
if (context2 == null) {
throw new Error("useThemeContext must be used within a ThemeContext.Provider");
}
return context2;
}
export { r25 as FALLBACK_THEME_CONTEXT_VALUE };
export { context as ThemeContext };
export function UseThemeContext(props) {
const children = props.children;
const context2 = useContext(context);
if (context2 == null) {
throw new Error("useThemeContext must be used within a ThemeContext.Provider");
}
return <>
{children(context2)}
</>;
}