All files / buffer-web-components/BreadCrumb index.jsx

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 6/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              1x         1x             1x       1x 1x                                 1x            
import React from 'react';
import PropTypes from 'prop-types';
import {
  ArrowRightIcon,
  Text,
} from '@bufferapp/components';
 
const breadCrumbStyle = {
  alignItems: 'center',
  display: 'flex',
};
 
const arrowStyle = {
  display: 'flex',
  alignSelf: 'center',
  marginRight: '0.357rem',
  marginLeft: '0.357rem',
};
 
const childPage = {
  display: 'flex',
};
 
const BreadCrumb = props => (
  <div style={breadCrumbStyle}>
    <Text size={'small'}>{props.parentPage}</Text>
    <span style={arrowStyle}>
      <ArrowRightIcon />
    </span>
    <span style={childPage}>
      <Text
        size={'small'}
        weight={'bold'}
        color={'outerSpace'}
      >
        {props.childPage}
      </Text>
    </span>
  </div>
);
 
BreadCrumb.propTypes = {
  parentPage: PropTypes.string.isRequired,
  childPage: PropTypes.string.isRequired,
};
 
export default BreadCrumb;