Skip to content

Commit d1b1841

Browse files
refactor(devtools): dynamic theme types
1 parent 3e314cc commit d1b1841

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

web-devtools/global.d.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import { DefaultTheme } from "styled-components";
2-
3-
import { darkTheme } from "@kleros/ui-components-library";
4-
2+
import { theme } from "styles/Theme";
53
declare module "styled-components" {
6-
type Theme = typeof darkTheme;
7-
export interface DefaultTheme extends Theme {
8-
klerosUIComponentsSkeletonBackground: string;
9-
klerosUIComponentsSkeletonHighlight: string;
10-
klerosUIComponentsVioletPurple: string;
11-
klerosUIComponentsLavenderPurple: string;
12-
}
4+
type Theme = typeof theme;
5+
export interface DefaultTheme extends Theme {}
136
}

web-devtools/src/styles/Theme.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { DefaultTheme } from "styled-components";
2-
31
import { darkTheme } from "@kleros/ui-components-library";
42

5-
export const theme: DefaultTheme = {
3+
export const theme = {
64
...darkTheme,
75
klerosUIComponentsSkeletonBackground: "#EBEBEB",
86
klerosUIComponentsSkeletonHighlight: "#F5F5F5",

0 commit comments

Comments
 (0)