Skip to content

Commit

Permalink
Add dark mode detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jul 18, 2019
1 parent 45c12af commit 2dcaff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.js
Expand Up @@ -26,7 +26,7 @@ class App extends Component {
super(props);
this.state = {
src: localStorage.getItem(STORAGE_ENTRY) || defaultSrc,
isDark: false,
isDark: matchMedia("(prefers-color-scheme: dark)").matches,
};

this.handleOptionChange = this.handleOptionChange.bind(this);
Expand Down

0 comments on commit 2dcaff2

Please sign in to comment.