Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/ui / src / components / molecules / BreadCrumb / BreadCrumb.tsx
Size: Mime:
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