@graphiql/react
Version:
[Changelog](https://github.com/graphql/graphiql/blob/main/packages/graphiql-react/CHANGELOG.md) | [API Docs](https://graphiql-test.netlify.app/typedoc/modules/graphiql_react.html) | [NPM](https://www.npmjs.com/package/@graphiql/react)
10 lines (9 loc) • 305 B
TypeScript
/**
* The value `null` semantically means that the user does not explicitly choose
* any theme, so we use the system default.
*/
export declare type Theme = 'light' | 'dark' | null;
export declare function useTheme(defaultTheme?: Theme): {
theme: Theme;
setTheme: (newTheme: Theme) => void;
};