|
|
@ -11,11 +11,12 @@ function Toolbar(props) { |
|
|
|
} |
|
|
|
|
|
|
|
class App extends React.Component { |
|
|
|
state = { |
|
|
|
constructor(props) { |
|
|
|
this.state = { |
|
|
|
theme: themes.light, |
|
|
|
}; |
|
|
|
|
|
|
|
toggleTheme = () => { |
|
|
|
this.toggleTheme = () => { |
|
|
|
this.setState(state => ({ |
|
|
|
theme: |
|
|
|
state.theme === themes.dark |
|
|
@ -23,6 +24,7 @@ class App extends React.Component { |
|
|
|
: themes.dark, |
|
|
|
})); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
//highlight-range{1-3}
|
|
|
|