mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 18:48:55 +00:00

* perf: input guide code * perf: input guide ui * Chat input guide api * Update app chat config store * perf: app chat config field * perf: app context * perf: params * fix: ts * perf: filter private config * perf: filter private config * perf: import workflow * perf: limit max tip amount
20 lines
494 B
TypeScript
20 lines
494 B
TypeScript
import React, { forwardRef } from 'react';
|
|
import { Box, BoxProps } from '@chakra-ui/react';
|
|
import Loading from '../MyLoading';
|
|
|
|
type Props = BoxProps & {
|
|
isLoading?: boolean;
|
|
text?: string;
|
|
};
|
|
|
|
const MyBox = ({ text, isLoading, children, ...props }: Props, ref: any) => {
|
|
return (
|
|
<Box ref={ref} position={isLoading ? 'relative' : 'unset'} {...props}>
|
|
{isLoading && <Loading fixed={false} text={text} />}
|
|
{children}
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default forwardRef(MyBox);
|