define a few meta components in storybook (#55)

This commit is contained in:
Kris Urbas
2020-08-17 00:28:48 +10:00
committed by GitHub
parent 59a0e8f627
commit ba683acd26
10 changed files with 248 additions and 101 deletions

View File

@@ -0,0 +1,26 @@
import { Box, Text } from '@chakra-ui/core';
import React from 'react';
export type MetaBoxProps = {
title: string;
children: React.ReactNode;
};
export const MetaBox: React.FC<MetaBoxProps> = ({ children, title }) => (
<Box>
<Box bg="purpleBoxLight" p={4}>
<Text
fontFamily="mono"
fontSize="sm"
fontWeight="bold"
color="blueLight"
as="div"
>
{title}
</Text>
</Box>
<Box bg="purpleBoxDark" p={6}>
{children}
</Box>
</Box>
);