2020-03-20 22:56:27 +01:00
|
|
|
import React from 'react';
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
import classnames from 'classnames';
|
|
|
|
|
|
2024-05-27 20:30:25 +02:00
|
|
|
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
|
2023-09-01 22:19:39 +02:00
|
|
|
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;
|