mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
New overview layout.
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18) (push) Has been cancelled
This commit is contained in:
parent
bab4f8ebcc
commit
5f27ba149b
5 changed files with 45 additions and 42 deletions
|
|
@ -10,6 +10,7 @@ export interface LoadingPanelProps extends ColumnProps {
|
|||
isLoading?: boolean;
|
||||
isFetching?: boolean;
|
||||
loadingIcon?: 'dots' | 'spinner';
|
||||
loadingPosition?: 'center' | 'page' | 'inline';
|
||||
renderEmpty?: () => ReactNode;
|
||||
children: ReactNode;
|
||||
}
|
||||
|
|
@ -21,6 +22,7 @@ export function LoadingPanel({
|
|||
isLoading,
|
||||
isFetching,
|
||||
loadingIcon = 'dots',
|
||||
loadingPosition = 'page',
|
||||
renderEmpty = () => <Empty />,
|
||||
children,
|
||||
...props
|
||||
|
|
@ -32,7 +34,7 @@ export function LoadingPanel({
|
|||
{/* Show loading spinner only if no data exists */}
|
||||
{(isLoading || isFetching) && (
|
||||
<Column position="relative" height="100%" {...props}>
|
||||
<Loading icon={loadingIcon} position="page" />
|
||||
<Loading icon={loadingIcon} position={loadingPosition} />
|
||||
</Column>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue