mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-01 22:29:44 +08:00
feat: add theme change handler
This commit is contained in:
+13
-10
@@ -1,17 +1,20 @@
|
||||
import '@emotion/react';
|
||||
import { AffineTheme } from './types';
|
||||
|
||||
interface AffineTheme {
|
||||
colors: {
|
||||
primary: string;
|
||||
};
|
||||
}
|
||||
|
||||
export const theme: AffineTheme = {
|
||||
export const lightTheme: AffineTheme = {
|
||||
colors: {
|
||||
primary: '#0070f3',
|
||||
},
|
||||
};
|
||||
|
||||
declare module '@emotion/react' {
|
||||
export interface Theme extends AffineTheme {}
|
||||
}
|
||||
export const darkTheme: AffineTheme = {
|
||||
colors: {
|
||||
primary: '#000',
|
||||
},
|
||||
};
|
||||
|
||||
export const globalThemeConstant = (theme: AffineTheme) => {
|
||||
return {
|
||||
'--color-primary': theme.colors.primary,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user