mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-28 03:49:37 +00:00
13 lines
337 B
TypeScript
13 lines
337 B
TypeScript
import React, { useContext } from 'react';
|
|
|
|
import { Theme } from '@conf/theme/types';
|
|
|
|
export const CustomThemeContext = React.createContext<{
|
|
theme?: Theme;
|
|
updateTheme: (theme: Theme) => void;
|
|
}>({ theme: undefined, updateTheme: (_) => null });
|
|
|
|
export function useCustomTheme() {
|
|
return useContext(CustomThemeContext);
|
|
}
|