All files / components/grid/story alignment.js

0% Statements 0/18
0% Branches 0/8
0% Functions 0/3
0% Lines 0/6
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68                                                                                                                                       
import React from 'react'
import { Grid, Col, Row } from '../index'
 
const styleRow = {
  backgroundColor: 'rgba(0,160,233, .7)',
  color: 'white'
}
 
const styleCol = {
  width: '100%',
  height: '50px',
  backgroundColor: '#00a0e9',
  display: 'flex',
  alignItems: 'center',
  justifyContent: 'center',
  color: 'white'
}
 
const Alignment = () => (
  <Grid>
    <Row start='xs' style={styleRow}>
      <Col xs={6}>
        <div style={styleCol}>start</div>
      </Col>
    </Row>
 
    <br />
 
    <Row center='xs' style={styleRow}>
      <Col xs={6}>
        <div style={styleCol}>center</div>
      </Col>
    </Row>
 
    <br />
 
    <Row end='xs' style={styleRow}>
      <Col xs={6}>
        <div style={styleCol}>end</div>
      </Col>
    </Row>
 
    <br />
 
    <Row top='xs' style={styleRow}>
      <Col xs={6}>
        <div style={{ ...styleCol, height: '100px' }} />
      </Col>
      <Col xs={6}>
        <div style={styleCol}>top</div>
      </Col>
    </Row>
 
    <br />
 
    <Row bottom='xs' style={styleRow}>
      <Col xs={6}>
        <div style={{ ...styleCol, height: '100px' }} />
      </Col>
      <Col xs={6}>
        <div style={styleCol}>bottom</div>
      </Col>
    </Row>
  </Grid>
)
 
export { Alignment }