Files
FastGPT/client/src/components/Markdown/Loading.tsx
2023-06-15 20:06:56 +08:00

26 lines
583 B
TypeScript

import React, { memo } from 'react';
import { Box } from '@chakra-ui/react';
const Loading = ({ text }: { text?: string }) => {
return (
<Box>
<Box
minW={'100px'}
w={'100%'}
h={'80px'}
backgroundImage={'url("/imgs/loading.gif")'}
backgroundSize={'contain'}
backgroundRepeat={'no-repeat'}
backgroundPosition={'center'}
/>
{text && (
<Box mt={1} textAlign={'center'} fontSize={'sm'} color={'myGray.600'}>
{text}
</Box>
)}
</Box>
);
};
export default memo(Loading);