2020-10-07 09:41:58 -07:00
|
|
|
import * as React from 'react';
|
|
|
|
import { Flex, Text, useColorMode } from '@chakra-ui/core';
|
2020-04-24 11:41:43 -07:00
|
|
|
|
2020-10-07 09:41:58 -07:00
|
|
|
const bg = { light: 'blackAlpha.50', dark: 'whiteAlpha.100' };
|
2020-04-24 11:41:43 -07:00
|
|
|
|
2020-07-05 17:20:10 -07:00
|
|
|
export const CardHeader = ({ children, ...props }) => {
|
2020-04-24 11:41:43 -07:00
|
|
|
const { colorMode } = useColorMode();
|
|
|
|
return (
|
|
|
|
<Flex
|
|
|
|
bg={bg[colorMode]}
|
|
|
|
p={4}
|
|
|
|
direction="column"
|
|
|
|
roundedTopLeft={4}
|
|
|
|
roundedTopRight={4}
|
|
|
|
borderBottomWidth="1px"
|
2020-10-07 09:41:58 -07:00
|
|
|
{...props}>
|
2020-04-24 11:41:43 -07:00
|
|
|
<Text fontWeight="bold">{children}</Text>
|
|
|
|
</Flex>
|
|
|
|
);
|
|
|
|
};
|