Skip to content

Commit

Permalink
feat: add theme data context
Browse files Browse the repository at this point in the history
  • Loading branch information
jonyw4 committed Nov 24, 2021
1 parent 5a5ad73 commit a0e6548
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions webapp/src/components/global/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import { Theme } from "../../domain";


export interface ThemeData {
theme: Theme;
changeTheme: (theme: Theme) => void;
}

// @ts-ignore
export const ThemeDataContext = React.createContext<ThemeData>();
export const useTheme = () => React.useContext(ThemeDataContext);

0 comments on commit a0e6548

Please sign in to comment.