-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
46 lines (41 loc) · 1.35 KB
/
Copy pathApp.js
File metadata and controls
46 lines (41 loc) · 1.35 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React, { Component } from 'react';
import '@rmwc/theme/styles';
import '@rmwc/button/styles';
import '@rmwc/grid/styles';
import '@rmwc/typography/styles';
import '@rmwc/card/styles';
import './App.css';
import { ApolloProvider } from '@apollo/client';
import client from './API/gitHubClient';
import Intro from './containers/intro';
import About from './containers/about';
import ColorSelector from './components/colorSelector';
import CardContainer from './containers/cardContainer';
import Footer from './containers/footer';
import { AQUA_STYLE } from './default_styles/style';
class App extends Component {
constructor() {
super();
this.state = AQUA_STYLE;
this.handleClick = this.handleClick.bind(this);
}
handleClick(style) {
const { primary, secondary, tertiary } = style;
this.setState({ primary, secondary, tertiary });
}
render() {
const { primary, secondary, tertiary } = this.state;
return (
<div style={primary}>
<ApolloProvider client={client}>
<ColorSelector style={secondary} handleClick={this.handleClick} />
<Intro primary={primary} secondary={secondary} />
<About secondary={secondary} tertiary={tertiary} />
<CardContainer style={secondary} />
<Footer style={secondary} />
</ApolloProvider>
</div>
);
}
}
export default App;