mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 22:47:52 +02:00
feat(theme-common): JSDoc for all APIs (#6974)
* feat(theme-common): JSDoc for all APIs * fix tests
This commit is contained in:
parent
4103fef11e
commit
b456a64f61
48 changed files with 871 additions and 679 deletions
|
@ -127,6 +127,9 @@ export type ThemeConfig = {
|
|||
// User-provided theme config, unnormalized
|
||||
export type UserThemeConfig = DeepPartial<ThemeConfig>;
|
||||
|
||||
/**
|
||||
* A convenient/more semantic way to get theme config from context.
|
||||
*/
|
||||
export function useThemeConfig(): ThemeConfig {
|
||||
return useDocusaurusContext().siteConfig.themeConfig as ThemeConfig;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue