mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
define a few meta components in storybook (#55)
This commit is contained in:
26
packages/design-system/src/MetaBox.tsx
Normal file
26
packages/design-system/src/MetaBox.tsx
Normal 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>
|
||||
);
|
||||
Reference in New Issue
Block a user