Sha256: 8f74916ba9e33c2746d3dfd733a920e4a81da88bb209af239d00ec83cc7511f6

Contents?: true

Size: 1.07 KB

Versions: 44

Compression:

Stored size: 1.07 KB

Contents

/* @flow */

import React, { type Node } from 'react'
import classnames from 'classnames'
import { spacing } from '../utilities/spacing.js'

type TableProps = {
  children: Array<Node> | Node,
  className: string,
  container: boolean,
  dark: boolean,
  dataTable: boolean,
  disableHover: boolean,
  responsive: "collapse" | "scroll" | "none",
  singleLine: boolean,
  size: "sm" | "md" | "lg",
}

const Table = (props: TableProps) => {
  const {
    children,
    className,
    container = true,
    dark = false,
    dataTable = false,
    disableHover = false,
    responsive = 'collapse',
    singleLine = false,
    size = 'sm',
  } = props

  return (
    <table
        className={classnames(
        className,
        'pb_table',
        `table-${size}`,
        `table-responsive-${responsive}`,
        {
          'table-card': container,
          'table-dark': dark,
          'data_table': dataTable,
          'single-line': singleLine,
          'no-hover': disableHover,
        },
        spacing(props)
      )}
    >
      {children}
    </table>
  )
}

export default Table

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
playbook_ui-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-6.0.1.pre.alpha2 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-6.0.1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-6.0.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.1.pre.alpha4 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.1.pre.alpha3 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha10 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.5.0.pre.alpha1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha9 app/pb_kits/playbook/pb_table/_table.jsx