Sha256: e887ef9f5c7fa42dcdef55d85175238dd81ba97689d9a6ce612027c2e693a5a4

Contents?: true

Size: 944 Bytes

Versions: 208

Compression:

Stored size: 944 Bytes

Contents

/* @flow */

import React, { type Node } from 'react'
import classnames from 'classnames'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps.js'

type ListItemProps = {
  aria?: object,
  children: array<Node> | Node,
  className?: string,
  data?: object,
  id?: string,
  tabIndex?: string,
}

const ListItem = (props: ListItemProps) => {
  const {
    aria = {},
    children,
    className,
    data = {},
    id,
    tabIndex,
  } = props

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const classes = classnames(
    buildCss('pb_item_kit'),
    globalProps(props),
    className
  )

  return (
    <>
      <li
          {...ariaProps}
          {...dataProps}
          className={classes}
          id={id}
          tabIndex={tabIndex}
      >
        {children}
      </li>
    </>
  )
}

export default ListItem

Version data entries

208 entries across 208 versions & 1 rubygems

Version Path
playbook_ui-9.6.1.pre.deps1 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.6.0 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.5.0.alpha.rs.downgrade app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.5.0 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.4.0.alpha.sisense app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.4.0.alpha.user.kit.bug app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.4.0 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.1.pre.alpha2 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.4.0.pre.alpha2 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.4.0.pre.alpha1 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.1.pre.alpha1 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0.alpha.inline3 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.2 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.3.0 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.2.2 app/pb_kits/playbook/pb_list/_list_item.jsx
playbook_ui-9.2.1 app/pb_kits/playbook/pb_list/_list_item.jsx