I have the following react component:
render() {
return (
<div className="App">
<header className="App-header">
<AppBar position="static">
<ToolBar>
<Grid container>
<Grid conatiner justify="center" item lg={10}>
<p>The Game Of Life</p>
</Grid>
<Grid container direction="row" justify="flex-end" alignItems="center" item lg={2}>
<this.BarButton label="Clear" callBack={() => this.catchAction('clear')} />
<this.BarButton label="Go!" callBack={() => this.catchAction('go')}/>
</Grid>
</Grid>
</ToolBar>
</AppBar>
<Grid container directiorn="row" justify="center" alignItems="center" item lg={10}>
<canvas id="canvas" width="100vw" heigth="100vh" style={{border: '1px solid #000000'}}></canvas>
</Grid>
</header>
</div>
)
}
I want the canvas to fit the whole screen left after the AppBar
, so I tried applying answers to this question, but none of them worked, and the canvas only covers a small part of the remaining screen:
I haven't found another solution to my issue.