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-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.20.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.19.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.18.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.17.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.16.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.16.0.pre.alpha.reactupgrade1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.15.0.pre.alpha.table1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.16.0.pre.alpha.pagination.rails1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.15.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.14.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.13.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_table/_table_row.jsx