diff options
author | Anton Dubik <anton.dubik33@gmail.com> | 2020-01-28 22:09:49 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-28 22:09:49 +0300 |
commit | d246305bfa280221efa8ee31cf6a841fbf54f378 (patch) | |
tree | 2029301838a09c072a8e4caaa3e6dc6e7a0c1a15 /src/index.js | |
parent | 51326e543f5f7d468d30e46288e91ef98d77a9d8 (diff) | |
parent | 53143dfc36e66e285256706a8ec837e2bd2f8427 (diff) | |
download | react-benzin-d246305bfa280221efa8ee31cf6a841fbf54f378.tar.gz |
Merge pull request #1 from Eug-VS/developv1.0.1
BENZIN Release 1.0.1
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..1aec963 --- /dev/null +++ b/src/index.js @@ -0,0 +1,71 @@ +import React, { useState } from 'react'; +import ReactDOM from 'react-dom'; + +import { makeStyles, Button } from '@material-ui/core'; + +import { + BenzinThemeProvider, + Header, + Window, + ContentSection, +} from './lib'; + +import icon from './lib/assets/icon.png'; +import icon2 from './lib/assets/icon2.svg'; +import HomeIcon from '@material-ui/icons/Home'; +import PlayCircleFilledWhiteIcon from '@material-ui/icons/PlayCircleFilledWhite'; +import ExploreIcon from '@material-ui/icons/Explore'; +import GitHubIcon from '@material-ui/icons/GitHub'; + + +const useStyles = makeStyles(theme => ({ + window: { + padding: theme.spacing(4), + } +})); + +const headerContents = { + home: <HomeIcon />, + 'getting started': <PlayCircleFilledWhiteIcon />, + explore: <ExploreIcon />, + contribute: <GitHubIcon />, +} + +const Icon1 = <img src={icon} width="32px" height="37px" alt="logo"/> +const Icon2 = <img src={icon2} height="32px" alt="logo"/> + +const App = () => { + const classes = useStyles(); + const [page, setPage] = useState('home'); + + return ( + <BenzinThemeProvider> + <Header + logo={{ + icon: Icon1, + title: 'BENZIN', + }} + contents={headerContents} + page={page} + setPage={setPage} + /> + <Window type="mono"> + <div className={classes.window}> + <ContentSection sectionName="Out of fuel? You've came to the right place!"> + <p> Here is some text about BENZIN library. </p> + <Button variant="contained" color="secondary"> + Charge me up! + </Button> + <Button variant="contained" color="primary"> + Learn more + </Button> + </ContentSection> + </div> + </Window> + </BenzinThemeProvider> + ); +}; + + +ReactDOM.render(<App />, document.getElementById('root')); + |