summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/containers/UiElements/demos/Breadcrumbs/PaperBreadcrumbs.js
blob: 70effb0a84e3b7c2e3d44583cda0bfeb657e00c1 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import React, { Fragment, PureComponent } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { BreadCrumb } from 'ba-components';

import { Typography, Grid, Paper } from '@material-ui/core';

const styles = theme => ({
  demo: {
    height: 'auto',
  },
  divider: {
    margin: `${theme.spacing(3)}px 0`,
  },
  alone: {
    position: 'relative',
    margin: 20
  },
  field: {
    margin: '10px',
    position: 'relative'
  },
  paper: {
    padding: '5px 10px 1px',
    borderRadius: 5
  }
});

class ClassicBreadcrumbs extends PureComponent {
  render() {
    const { classes } = this.props;
    const location = { pathname: '/grand-parent/parent/children' };
    return (
      <Fragment>
        <Grid
          container
          alignItems="flex-start"
          justify="flex-start"
          direction="row"
          spacing={1}
        >
          <Grid
            item
            md={6}
            container
            alignItems="center"
            justify="center"
            direction="column"
          >
            <Typography variant="button" className={classes.divider}>Arrow Separator</Typography>
            <div className={classes.field}>
              <Paper className={classes.paper}>
                <BreadCrumb theme="dark" separator=" › " location={location} />
              </Paper>
            </div>
          </Grid>
          <Grid
            item
            md={6}
            container
            alignItems="center"
            justify="center"
            direction="column"
          >
            <Typography variant="button" className={classes.divider}>Slash Separator</Typography>
            <div className={classes.field}>
              <Paper className={classes.paper}>
                <BreadCrumb theme="dark" separator=" / " location={location} />
              </Paper>
            </div>
          </Grid>
          <Grid
            item
            md={12}
            container
            alignItems="center"
            justify="center"
            direction="column"
          >
            <Typography variant="button" className={classes.divider}>Greater Than Separator</Typography>
            <div className={classes.field}>
              <Paper className={classes.paper}>
                <BreadCrumb theme="dark" separator=" > " location={location} />
              </Paper>
            </div>
          </Grid>
        </Grid>
      </Fragment>
    );
  }
}

ClassicBreadcrumbs.propTypes = {
  classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(ClassicBreadcrumbs);