2017-02-20 18:15:36 +02:00
|
|
|
import { clearfix, Baseline } from '../../shared/composers';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import React from 'react';
|
2017-01-19 16:59:59 +02:00
|
|
|
|
|
|
|
const StyledTableBody = styled.article`
|
|
|
|
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.05);
|
|
|
|
${clearfix}
|
|
|
|
`;
|
|
|
|
|
|
|
|
const TableBody = ({
|
2017-02-20 18:15:36 +02:00
|
|
|
children,
|
|
|
|
...props
|
|
|
|
}) => children.length <= 1 ? null : (
|
|
|
|
<StyledTableBody {...props}>
|
|
|
|
{children}
|
|
|
|
</StyledTableBody>
|
|
|
|
);
|
2017-01-19 16:59:59 +02:00
|
|
|
|
|
|
|
TableBody.propTypes = {
|
|
|
|
children: React.PropTypes.node
|
|
|
|
};
|
|
|
|
|
2017-02-20 18:15:36 +02:00
|
|
|
export default Baseline(
|
2017-02-15 03:19:26 +02:00
|
|
|
StyledTableBody
|
2017-02-20 18:15:36 +02:00
|
|
|
);
|