ohif-viewer/platform/ui/src/components/Table/Table.tsx
Alireza 70f2c797f4
feat(ui): move to React 18 and base for using shadcn/ui (#4174)
Co-authored-by: IbrahimCSAE <ibrahim.mdev@gmail.com>
2024-05-27 14:30:25 -04:00

32 lines
641 B
TypeScript

import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
const Table = ({ children, className = '', fullWidth = true, style = {} }) => {
const classes = {
base: 'text-lg text-white',
fullWidth: {
true: 'w-full',
false: '',
},
};
return (
<div
className={classnames(classes.base, classes.fullWidth[fullWidth], className)}
style={style}
>
{children}
</div>
);
};
Table.propTypes = {
fullWidth: PropTypes.bool,
children: PropTypes.node.isRequired,
className: PropTypes.string,
style: PropTypes.object,
};
export default Table;