forked from wso2/carbon-apimgt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VerticalDivider.jsx
33 lines (28 loc) · 931 Bytes
/
VerticalDivider.jsx
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
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
const styles = {
divider: {
borderRight: 'solid 1px #ccc',
},
};
function VerticalDivider(props) {
const { classes } = props;
const height = props.height ? props.height : 30;
const marginLeft = props.marginLeft ? props.marginLeft : 10;
const marginRight = props.marginRight ? props.marginRight : 10;
return (
<React.Fragment>
<div className={classes.divider} style={{ height, marginLeft, marginRight }} />
</React.Fragment>
);
}
VerticalDivider.propTypes = {
classes: PropTypes.shape({
divider: PropTypes.string,
}).isRequired,
height: PropTypes.shape({}).isRequired,
marginLeft: PropTypes.shape({}).isRequired,
marginRight: PropTypes.shape({}).isRequired,
};
export default withStyles(styles)(VerticalDivider);