mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 01:40:51 +00:00

* fix http plugin edge (#95) * fix http plugin edge * use getHandleId * perf: i18n file * feat: histories list * perf: request lock * fix: ts * move box components * fix: edit form refresh --------- Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
20 lines
472 B
TypeScript
20 lines
472 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={'relative'} {...props}>
|
|
{isLoading && <Loading fixed={false} text={text} />}
|
|
{children}
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default forwardRef(MyBox);
|