feat(website): add infobox component

This commit is contained in:
moklick
2020-10-06 17:34:35 +02:00
parent fef456c2b7
commit d256d95bdd
3 changed files with 35 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
import React from 'react';
import styled from '@emotion/styled';
import { Box } from 'reflexbox';
const Wrapper = styled(Box)`
padding: 16px;
background: ${(p) => p.theme.colors.violetLighten45};
color: white;
border-radius: 5px;
margin: 20px 0;
`;
const Title = styled(Box)`
font-size: 20px;
margin-bottom: 4px;
font-weight: 900;
`;
export default ({ title = null, text, ...rest }) => {
return (
<Wrapper {...rest}>
<Title>{title}</Title>
<div>{text}</div>
</Wrapper>
);
};