From aa9e4946fb468d65b60143b3d4e9ca6e493058f0 Mon Sep 17 00:00:00 2001 From: myxvisual Date: Tue, 22 May 2018 10:41:59 +0800 Subject: [PATCH] fix: Fixed theme types error --- src/styles/darkTheme.ts | 3 ++- src/styles/getStripedBackground.ts | 2 +- src/styles/lightTheme.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/styles/darkTheme.ts b/src/styles/darkTheme.ts index 9130a771..cb6c4da4 100644 --- a/src/styles/darkTheme.ts +++ b/src/styles/darkTheme.ts @@ -1,2 +1,3 @@ import getTheme from "./getTheme"; -export default getTheme({ themeName: "dark" }); +const darkTheme: ReactUWP.ThemeType = getTheme({ themeName: "dark" }); +export default darkTheme; diff --git a/src/styles/getStripedBackground.ts b/src/styles/getStripedBackground.ts index d0e45d8c..398d679f 100644 --- a/src/styles/getStripedBackground.ts +++ b/src/styles/getStripedBackground.ts @@ -1,4 +1,4 @@ -export default function getStripedBackground(size = 4, firstColor = "#000", secondColor = "hsla(0, 0%, 0%, 0.85)") { +export default function getStripedBackground(size = 4, firstColor = "#000", secondColor = "hsla(0, 0%, 0%, 0.85)"): React.CSSProperties { return { background: `linear-gradient(45deg, ${firstColor} 25%, ${secondColor} 0px, ${secondColor} 50%, ${firstColor} 0px, ${firstColor} 75%, ${secondColor} 0px) 0% 0% / ${size}px ${size}px ${firstColor}` } as React.CSSProperties; diff --git a/src/styles/lightTheme.ts b/src/styles/lightTheme.ts index 4412c2f5..92c7e95b 100644 --- a/src/styles/lightTheme.ts +++ b/src/styles/lightTheme.ts @@ -1,3 +1,3 @@ import getTheme from "./getTheme"; - -export default getTheme({ themeName: "dark" }); +const lightTheme: ReactUWP.ThemeType = getTheme({ themeName: "light" }); +export default lightTheme;