Sha256: 5b1f67d4c26c60f739d3392d9fe5ecb78bb058799fd598808b265512ee9272b1

Contents?: true

Size: 1.04 KB

Versions: 367

Compression:

Stored size: 1.04 KB

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?: {[key: string]: string},
  className?: string,
  data?: object,
  id?: string,
  component?: "a" | "span",
  [x:string]: any;
}


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

Version data entries

367 entries across 367 versions & 1 rubygems

Version Path
playbook_ui-11.3.0 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.7 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.6 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.5 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.4 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.4.pre.alpha1 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx
playbook_ui-11.2.3 app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx