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.15.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.14.0.pre.alpha.lightboxcurrentphotoprop460 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.14.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown457 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.14.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown456 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.14.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.13.0.pre.alpha.PLAY693tooltipwrongbg440 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.13.0.pre.alpha.addingProductTokens439 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.13.0.pre.alpha.PLAY705phonenumberkit438 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.13.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.12.0.pre.alpha.PLAY697sandpacklayoutstyles413 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.12.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.11.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.10.0.pre.alpha.PLAY705phonenumberreturn372 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.10.0.pre.alpha.PLAY677richtexteditorts370 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.10.0 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.9.1.pre.alpha.play664tiptapinvestigation353 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.9.1.pre.alpha.PLAY689bugtxtinputlabel346 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.9.1.pre.alpha.menucleanup345 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.9.1.pre.alpha.menucleanup342 app/pb_kits/playbook/pb_table/_table_row.jsx
playbook_ui-12.9.1 app/pb_kits/playbook/pb_table/_table_row.jsx