Sha256: d8923548cde493c429fd7ed3989c9e2739266794e49d3acedd178c3838d71554

Contents?: true

Size: 1.01 KB

Versions: 156

Compression:

Stored size: 1.01 KB

Contents

/* @flow */
import React from 'react'
import classnames from 'classnames'
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
import { globalProps } from '../utilities/globalProps'

type TableRowPropTypes = {
  aria?: object,
  children: array<React.ReactNode> | React.ReactNode,
  className: string,
  data?: object,
  id?: string,
  sideHighlightColor: string,
}

const TableRow = (props: TableRowPropTypes) => {
  const {
    aria = {},
    children,
    className,
    data = {},
    id,
    sideHighlightColor = 'windows',
  } = props

  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const sideHighlightClass =
    sideHighlightColor != '' ? `side_highlight_${sideHighlightColor}` : null
  const classes = classnames(buildCss('pb_table_row_kit', sideHighlightClass), globalProps(props), className)

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

export default TableRow

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
playbook_ui-12.6.0.pre.alpha.collapsible1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.6.0.pre.alpha.cssphone1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.6.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.5.0.pre.alpha.datepickerinput1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.5.0.pre.alpha.phonerails1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.5.0.pre.alpha.datepicker1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.5.0.pre.alpha.filter1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.5.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.4.0.pre.alpha.map1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.4.0.pre.alpha.devdocstest1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.4.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.3.1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.3.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.2.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.1.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.0.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_table/_table_row.jsx