@kiwicom/orbit-components
Version:
<div align="center"> <a href="https://orbit.kiwi" target="_blank"> <img alt="orbit-components" src="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components.png" srcset="https://orbit.kiwi/wp-content/uploads/2018/08/orbit-components@2x.png 2x"
30 lines (22 loc) • 711 B
JavaScript
// @flow
import * as React from "react";
import styled from "styled-components";
import defaultTokens from "../../defaultTokens";
import type { Props } from "./index";
export const StyledCardSection = styled.div`
width: 100%;
padding: ${({ theme }) => theme.orbit.spaceLarge};
box-sizing: border-box;
border-top: ${({ theme }) =>
`${theme.orbit.borderWidthCard} ${theme.orbit.borderStyleCard} ${theme.orbit.borderColorCard}`};
&:first-of-type {
border: 0;
}
`;
StyledCardSection.defaultProps = {
theme: defaultTokens,
};
const CardSection = ({ children, dataTest }: Props) => (
<StyledCardSection data-test={dataTest}>{children}</StyledCardSection>
);
export default CardSection;