ohif-viewer/platform/ui/src/components/Table/Table.tsx

32 lines
641 B
TypeScript
Raw Normal View History

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