remove contentBlock from content component

This commit is contained in:
August Skare
2018-10-22 13:24:43 +02:00
parent 8cf720986e
commit 00afb2440d
6 changed files with 15 additions and 17 deletions

View File

@@ -29,13 +29,12 @@ const Item = styled.div`
const StyledTitle = styled(Alpha)`
color: ${props => props.color};
margin-bottom: 6.25rem;
`;
interface ContentBlockProps extends Props {
title: string;
main?: boolean;
children: React.ReactNode;
children?: React.ReactNode;
}
function ContentBlock(props: ContentBlockProps) {
@@ -48,7 +47,7 @@ function ContentBlock(props: ContentBlockProps) {
return (
<Base>
<Title color={props.colors.main}>{props.title}</Title>
<Content>{children}</Content>
{children ? <Content>{children}</Content> : null}
</Base>
);
}