diff --git a/src/components/PageLoading/index.tsx b/src/components/PageLoading/index.tsx index 4be870bc..0873482d 100644 --- a/src/components/PageLoading/index.tsx +++ b/src/components/PageLoading/index.tsx @@ -1,11 +1,18 @@ import { Icon, Logo } from '@lobehub/ui'; import { Loader2 } from 'lucide-react'; -import { memo } from 'react'; +import React, { memo } from 'react'; import { Center, Flexbox } from 'react-layout-kit'; -const PageLoading = ({ title }: { title: string }) => { +interface PageLoadingProps { + className?: string; + style?: React.CSSProperties; + title: string; +} + +const PageLoading = (props: PageLoadingProps) => { + const { title, className, style } = props; return ( - +
diff --git a/src/features/AgentViewer/index.tsx b/src/features/AgentViewer/index.tsx index df29058e..08496326 100644 --- a/src/features/AgentViewer/index.tsx +++ b/src/features/AgentViewer/index.tsx @@ -95,7 +95,7 @@ function AgentViewer(props: Props) { return (
- {loading ? : null} + {loading ? : null}
); diff --git a/src/features/AgentViewer/style.ts b/src/features/AgentViewer/style.ts index d02680d0..d2042088 100644 --- a/src/features/AgentViewer/style.ts +++ b/src/features/AgentViewer/style.ts @@ -1,16 +1,21 @@ import { createStyles } from 'antd-style'; export const useStyles = createStyles(({ css, token }) => ({ + viewer: css` + position: relative; + height: 100%; + min-height: 0; + `, toolbar: css` position: absolute; right: ${token.paddingMD}px; bottom: 50%; display: flex; `, - viewer: css` - position: relative; - height: 100%; - min-height: 0; + loading: css` + position: absolute; + top: 0; + left: 0; `, canvas: css` display: block;