Created
April 22, 2019 11:53
-
-
Save barongun/61d1334cb1662fd621905fc9d133295e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react' | |
import { Container, Header, HeaderContent, Grid, GridColumn } from 'semantic-ui-react' | |
class Main extends Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
hello: 'heeeeeeello', | |
browser: {height: window.innerHeight, width: window.innerWidth}, | |
headerHeight: 50 | |
} | |
} | |
gridHeight = () => { | |
return this.state.browser.height - this.state.headerHeight | |
} | |
render () { | |
return ( | |
<Container style={{width: '100%', height: this.state.browser.height, backgroundColor: 'yellow'}}> | |
<Header style={{backgroundColor: 'red', height: this.state.headerHeight}}> | |
11111 | |
</Header> | |
<Grid style={{height: this.gridHeight()}}> | |
<GridColumn width={2} style={{backgroundColor: 'green'}}>11</GridColumn> | |
<GridColumn width={14} style={{backgroundColor: 'blue', width: '100%'}}>22</GridColumn> | |
</Grid> | |
</Container> | |
) | |
} | |
} | |
export default Main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment