mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 08:25:07 +00:00

* feat: think tag parse * feat: parse think tag test * feat: pdf parse ux * feat: doc2x parse * perf: rewrite training mode setting * feat: image parse queue * perf: image index * feat: image parse process * feat: add init sh * fix: ts
21 lines
569 B
TypeScript
21 lines
569 B
TypeScript
import React, { forwardRef } from 'react';
|
|
import { Box, BoxProps, SpinnerProps } from '@chakra-ui/react';
|
|
import Loading from '../MyLoading';
|
|
|
|
type Props = BoxProps & {
|
|
isLoading?: boolean;
|
|
text?: string;
|
|
size?: SpinnerProps['size'];
|
|
};
|
|
|
|
const MyBox = ({ text, isLoading, children, size, ...props }: Props, ref: any) => {
|
|
return (
|
|
<Box ref={ref} position={isLoading ? 'relative' : 'unset'} {...props}>
|
|
{children}
|
|
{isLoading && <Loading fixed={false} text={text} size={size} />}
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default React.memo(forwardRef(MyBox));
|