2020-11-29 01:25:48 -07:00
|
|
|
import { Flex, Text } from '@chakra-ui/react';
|
2020-10-18 14:47:33 -07:00
|
|
|
import { useColorValue } from '~/context';
|
|
|
|
|
2020-11-29 01:25:48 -07:00
|
|
|
import type { ICardHeader } from './types';
|
|
|
|
|
2020-11-03 01:51:41 -07:00
|
|
|
export const CardHeader = (props: ICardHeader) => {
|
2020-10-18 14:47:33 -07:00
|
|
|
const { children, ...rest } = props;
|
|
|
|
const bg = useColorValue('blackAlpha.50', 'whiteAlpha.100');
|
|
|
|
return (
|
|
|
|
<Flex
|
|
|
|
p={4}
|
|
|
|
bg={bg}
|
|
|
|
direction="column"
|
|
|
|
roundedTopLeft={4}
|
|
|
|
roundedTopRight={4}
|
|
|
|
borderBottomWidth="1px"
|
|
|
|
{...rest}>
|
|
|
|
<Text fontWeight="bold">{children}</Text>
|
|
|
|
</Flex>
|
|
|
|
);
|
|
|
|
};
|