Sha256: 58c5f8ae366dbcbd366b945aba5e91e911529a31318ad95249e778ae91a946a4

Contents?: true

Size: 1012 Bytes

Versions: 28

Compression:

Stored size: 1012 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'
import { globalProps, domSafeProps } from '../utilities/globalProps'

import {
  buildAriaProps,
  buildCss,
  buildDataProps,
} from '../utilities/props'

type BreadCrumbItemProps = {
  aria?: object,
  className?: string,
  data?: object,
  id?: string,
  component?: element
}
const BreadCrumbItem = (props: BreadCrumbItemProps) => {
  const {
    aria = {},
    className,
    data = {},
    id,
    component = 'a',
    ...rest
  } = props
  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const css = classnames(
    buildCss('pb_bread_crumb_item_kit'),
    globalProps(props),
    className
  )
  const Component = component || 'span'
  return (
    <div
        {...ariaProps}
        {...dataProps}
        className={css}
        id={id}
    >
      <Component
          className="pb_bread_crumb_item"
          {...domSafeProps(rest)}
      />
    </div>
  )
}
export default BreadCrumbItem

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
playbook_ui-10.26.0.pre.alpha3 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.25.1 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.26.0.pre.alpha1 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.25.0 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.25.0.pre.alpha3 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.25.0.pre.treeshaking1 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.24.0 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx
playbook_ui-10.24.0.pre.alpha1 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.jsx