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-5.2.0.pre.alpha8 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha7 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.3.0.pre.alpha1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.4.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha6 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha5 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.3.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha4 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha3 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0.pre.alpha2 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.2.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.1.0 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.0.2 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.0.1.pre.beta app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.1.0.pre.alpha4 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.1.0.pre.alpha2 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.1.0.pre.alpha1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.0.1 app/pb_kits/playbook/pb_table/_table.jsx
playbook_ui-5.0.1.pre.alpha1 app/pb_kits/playbook/pb_table/_table.jsx