2020-11-29 01:25:48 -07:00
|
|
|
import { Flex } 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 { ICardBody } from './types';
|
|
|
|
|
2020-10-18 14:47:33 -07:00
|
|
|
export const CardBody = (props: ICardBody) => {
|
|
|
|
const { onClick, ...rest } = props;
|
|
|
|
const bg = useColorValue('white', 'original.dark');
|
|
|
|
const color = useColorValue('original.dark', 'white');
|
|
|
|
return (
|
|
|
|
<Flex
|
|
|
|
bg={bg}
|
|
|
|
w="100%"
|
2020-12-15 01:18:04 -07:00
|
|
|
maxW="95%"
|
2020-10-18 14:47:33 -07:00
|
|
|
rounded="md"
|
|
|
|
color={color}
|
|
|
|
onClick={onClick}
|
|
|
|
overflow="hidden"
|
|
|
|
borderWidth="1px"
|
|
|
|
direction="column"
|
|
|
|
{...rest}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|