jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
18 lines (15 loc) • 649 B
JavaScript
import React__default from 'react';
import { td, th } from './styles.js';
/**
* @file index.tsx
*
* @fileoverview Displays a table cell. A specific cell of type th or td can also be used.
*/
const TableCell = ({ children, component = 'td', verticalAlign = 'baseline', textAlign, hideSm = false, sticky = false, stickyCol = false }) => {
let Component;
if (component) {
Component = component === 'td' ? td : th;
}
return (React__default.createElement(Component, { sticky: sticky, stickyCol: stickyCol, verticalAlign: verticalAlign, textAlign: textAlign, hideSm: hideSm }, children));
};
export { TableCell };