Pretty loading spinner
Reviewed By: antonk52 Differential Revision: D41343098 fbshipit-source-id: 69b75e7a93344d2a05fa6fac9f466126feaf8cad
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3722ac1fea
commit
b576060339
@@ -17,7 +17,7 @@ import {Tree} from './Tree';
|
||||
import {Visualization2D} from './Visualization2D';
|
||||
import {useKeyboardModifiers} from '../hooks/useKeyboardModifiers';
|
||||
import {Inspector} from './sidebar/Inspector';
|
||||
import {Input} from 'antd';
|
||||
import {Input, Spin} from 'antd';
|
||||
|
||||
export function Component() {
|
||||
const instance = usePlugin(plugin);
|
||||
@@ -80,5 +80,19 @@ export function Component() {
|
||||
);
|
||||
}
|
||||
|
||||
return <div>Loading...</div>;
|
||||
return (
|
||||
<Centered>
|
||||
<Spin data-testid="loading-indicator" />
|
||||
</Centered>
|
||||
);
|
||||
}
|
||||
|
||||
export function Centered(props: {children: React.ReactNode}) {
|
||||
return (
|
||||
<Layout.Horizontal center grow>
|
||||
<Layout.Container center grow>
|
||||
{props.children}
|
||||
</Layout.Container>
|
||||
</Layout.Horizontal>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user