@catho/quantum-storybook-ui
Version:
A **Design System** is the complete set of design standards, documentation, and principles along with the toolkit (UI patterns and code components) to achieve those standards. Over time, these 'systems' are growing in popularity - a very popular one is [Q
37 lines (29 loc) • 580 B
JSX
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
const StyledTable = styled.table`
width: 100%;
border-collapse: collapse;
margin-bottom: 40px;
&.bordered {
th,
td {
border: 1px solid #ccc;
}
}
th,
td {
padding: 8px;
text-align: left;
}
tr:nth-child(even) {
background-color: #f6f8fa;
}
`;
const Table = ({ children, ...rest }) => (
<StyledTable {...rest}>{children}</StyledTable>
);
Table.propTypes = {
children: PropTypes.node.isRequired
};
export default Table;