| 10 | import type { Theme } from './theming'; |
| 11 | |
| 12 | class App extends React.Component<*, { theme: Theme }> { |
| 13 | state = { |
| 14 | theme: themes.default, |
| 15 | }; |
| 16 | |
| 17 | handleThemeChange = (themeName: string) => { |
| 18 | this.setState({ theme: themes[themeName] }); |
| 19 | }; |
| 20 | |
| 21 | render() { |
| 22 | return ( |
| 23 | <ThemeProvider theme={this.state.theme}> |
| 24 | <div> |
| 25 | <Header /> |
| 26 | <ThemeChanger |
| 27 | onChangeTheme={this.handleThemeChange} |
| 28 | themes={Object.keys(themes)} |
| 29 | /> |
| 30 | </div> |
| 31 | </ThemeProvider> |
| 32 | ); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | export default App; |
nothing calls this directly
no outgoing calls
no test coverage detected