-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
30 lines (28 loc) · 805 Bytes
/
App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Header from "./Components/Header/Header";
import Footer from "./Components/Footer/Footer";
import Content from "./Components/Content/Content";
import React, { Component } from "react";
class App extends Component {
constructor(props) {
super(props);
this.state = {
theme: "light",
};
this.handleThemeChange = this.handleThemeChange.bind(this);
}
handleThemeChange(newTheme){
this.setState({ theme: newTheme });
}
render() {
return (
<div className={this.state.theme === "light" ? " " : "dark"}>
<div className="h-screen bg-white dark:bg-slate-800 select-none transition-colors">
<Header onThemeChange={this.handleThemeChange}/>
<Content />
<Footer />
</div>
</div>
);
}
}
export default App;