Repository URL to install this package:
|
Version:
4.2.0-a11y.0 ▾
|
import React from 'react'
import { EMPTY_ARRAY } from 'exotic'
import { BreadCrumbProps } from './typings'
import { renderList } from './renderProps'
import { BreadCrumbWrapper } from './styled'
/**
* @todo
* use fixture to share the default data to list property
*
* use all renderProps functions to render the UI
*/
class BreadCrumb extends React.PureComponent<BreadCrumbProps> {
static defaultProps = {
list: EMPTY_ARRAY,
}
render() {
const { list, className } = this.props
const listView = renderList(list)
return (
<BreadCrumbWrapper className={className} aria-orientation="horizontal">
{listView}
</BreadCrumbWrapper>
)
}
}
export { BreadCrumb }
export default BreadCrumb