aboutsummaryrefslogtreecommitdiff
path: root/src/index.tsx
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-06-06 23:23:46 +0300
committerGitHub <noreply@github.com>2020-06-06 23:23:46 +0300
commite87a7d3fe56da1df637b201bea0eed97a9233d4f (patch)
tree37d08e077f215a3677ff96489075c0189d4497f3 /src/index.tsx
parent7b932411d847a85f42015eb39d55b457675c714e (diff)
parenta23c4673ee2a59b45bc766df07aa208ee146e31e (diff)
downloadwhich-ui-e87a7d3fe56da1df637b201bea0eed97a9233d4f.tar.gz
Merge pull request #8 from ilyayudovin/header
Set up themes and add header
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx39
1 files changed, 34 insertions, 5 deletions
diff --git a/src/index.tsx b/src/index.tsx
index fa9a15a..9225909 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,7 +1,36 @@
-import React from 'react';
+import React, { useState } from 'react';
import ReactDOM from 'react-dom';
-ReactDOM.render(
- <h1> Hello, world! </h1>,
- document.getElementById('root')
-);
+import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
+import { CssBaseline } from '@material-ui/core';
+import teal from '@material-ui/core/colors/teal';
+import 'typeface-roboto';
+
+import Header from './Header/Header';
+
+const theme = createMuiTheme({
+ palette: {
+ primary: {
+ main: teal[700],
+ },
+ text: {
+ primary: '#000000',
+ secondary: 'rgba(255, 255, 255, 0.6)',
+ },
+ },
+});
+
+const App: React.FC = () => {
+ const [page, setPage] = useState('feed');
+
+ return (
+ <ThemeProvider theme={theme}>
+ <CssBaseline />
+ <Header page={page} setPage={setPage} />
+ <h1> Hello, world! </h1>
+ </ThemeProvider>
+ );
+};
+
+ReactDOM.render(<App />, document.getElementById('root'));
+