{"size": 781, "ext": "js", "max_stars_repo_path": "src/components/TableCell/index.js", "max_stars_repo_name": "CDCgov/phlip", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/TableCell/index.js", "max_issues_repo_name": "CDCgov/phlip", "max_issues_repo_issues_event_min_datetime": "2020-05-11T20:36:25.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-02T15:49:04.000Z", "max_forks_repo_path": "src/components/TableCell/index.js", "max_forks_repo_name": "LaudateCorpus1/phlip", "max_forks_repo_forks_event_min_datetime": "2020-12-21T21:23:00.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-27T23:12:56.000Z"}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": 2, "avg_line_length": 21.6944444444, "max_line_length": 89, "alphanum_fraction": 0.6606914213}
import React from 'react'
import PropTypes from 'prop-types'
import { default as MuiTableCell } from '@material-ui/core/TableCell'

/**
 * Wrapper for @material-ui/core's TableCell component
 */
export const TableCell = ({ style, padding, children, ...otherProps }) => {
  return (
    <MuiTableCell padding={padding} style={{ ...style, minWidth: '1%' }} {...otherProps}>
      {children}
    </MuiTableCell>
  )
}

TableCell.propTypes = {
  /**
   * Override style of table cell
   */
  style: PropTypes.object,
  /**
   * Contents of table cell
   */
  children: PropTypes.node,
  /**
   * How much padding to add to table cell, based on @material-ui/core's options
   */
  padding: PropTypes.string
}

TableCell.defaultProps = {
  padding: 'default'
}

export default TableCell
