1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import React from 'react' import PropTypes from 'prop-types' const Table = ({ children, ...rest }) => ( <div> {React.Children.map(children, child => React.cloneElement(child, rest))} </div> ) Table.propTypes = { children: PropTypes.element } export { Table } export { TableHeader } from './table-header' export { TableRow } from './table-row' export { TableCol } from './table-col' |