From f80ce5b4580e761d390139d1feef83c9d8234291 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 21 Jun 2020 14:35:09 +0300 Subject: [PATCH] Theme: add a class to indicate if in dark mode. --- src/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 654ea03..c77afae 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -182,13 +182,14 @@ class App extends React.PureComponent { public render() { const credentials = this.props.credentials ?? null; + const { darkMode } = this.props; const errors = this.props.errors; const fetching = this.props.fetchCount > 0; const muiTheme = createMuiTheme({ palette: { - type: this.props.darkMode ? 'dark' : undefined, + type: darkMode ? 'dark' : undefined, primary: amber, secondary: { light: lightBlue.A200, @@ -210,7 +211,7 @@ class App extends React.PureComponent { return ( -
+
} iconElementRight={