Sha256: 0a807de93ba650a8280d47b316fa2a5f0d52ec35d390829a079f036162ea521e
Contents?: true
Size: 1.17 KB
Versions: 3
Compression:
Stored size: 1.17 KB
Contents
import React from 'react'; import classnames from 'classnames'; import PropTypes from "prop-types"; const propTypes = { children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node ]), className: PropTypes.string, container: PropTypes.bool, dark: PropTypes.bool, disable_hover: PropTypes.bool, single_line: PropTypes.bool, size: PropTypes.oneOf(["sm", "md", "lg"]) }; const defaultProps = { container: false, dark: false, disable_hover: false, single_line: false, size: "sm" }; class Table extends React.Component { render() { const { children, className, container, dark, disable_hover, single_line, size } = this.props; const css = classnames([ 'pb_table', `table-${size}`, container ? `table-card` : null, dark ? `table-dark` : null, single_line ? `single-line` : null, disable_hover ? `no-hover` : null, className, ]) return ( <div> <table className={css}> {children} </table> </div> ) } } Table.propTypes = propTypes; Table.defaultProps = defaultProps; export default Table;
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
playbook_ui-2.9.4 | app/pb_kits/playbook/pb_table/_table.jsx |
playbook_ui-2.9.3 | app/pb_kits/playbook/pb_table/_table.jsx |
playbook_ui-2.9.2 | app/pb_kits/playbook/pb_table/_table.jsx |