File size: 1,367 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
import React from 'react';
import {
Box,
Flex,
Skeleton,
SkeletonText,
useColorModeValue,
VStack,
} from '@chakra-ui/react';
import useSkeletonColor from '../../hooks/useSkeletonColor';
const DashboardSkeleton = () => {
const skeletonColor = useSkeletonColor();
const ReactionBox = ({ m }) => {
return (
<VStack
flex='1'
justify='center'
p='1rem'
h='110px'
bg={useColorModeValue(
'light.cardSecondaryBg',
'dark.cardSecondaryBg'
)}
className='shadowSecondary'
borderRadius='5px'
m={m}
>
<Skeleton h='20px' w='30px' {...skeletonColor} />
<SkeletonText
noOfLines={1}
w='150px'
mx='auto'
{...skeletonColor}
/>
</VStack>
);
};
return (
<Box maxW='650px' flex='1' w='100%' mx='auto'>
<Box mt={2} px='.5rem'>
<Skeleton height='25px' w='200px' mb='1.5rem' {...skeletonColor} />
<Flex direction={{ base: 'column', sm: 'row' }}>
<ReactionBox m={{ base: '0 0 .5rem 0', sm: '0 .5rem 0 0' }} />
<ReactionBox />
</Flex>
</Box>
</Box>
);
};
export default DashboardSkeleton;
|