-
Notifications
You must be signed in to change notification settings - Fork 349
/
Breadcrumb.js
32 lines (27 loc) · 980 Bytes
/
Breadcrumb.js
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
import React from 'react';
import styles from '@patternfly/patternfly/components/Breadcrumb/breadcrumb.css';
import PropTypes from 'prop-types';
import { css } from '@patternfly/react-styles';
const propTypes = {
/** Children nodes be rendered to the BreadCrumb. Should be of type BreadCrumbItem. */
children: PropTypes.node,
/** Additional classes added to the breadcrumb nav. */
className: PropTypes.string,
/** Aria-label added to the breadcrumb nav. */
'aria-label': PropTypes.string,
/** Additional props are spread to the container <nav> */
'': PropTypes.any
};
const defaultProps = {
children: null,
className: '',
'aria-label': 'Breadcrumb'
};
const Breadcrumb = ({ className, children, ...props }) => (
<nav {...props} className={css(styles.breadcrumb, className)}>
<ol className={css(styles.breadcrumbList)}>{children}</ol>
</nav>
);
Breadcrumb.propTypes = propTypes;
Breadcrumb.defaultProps = defaultProps;
export default Breadcrumb;