mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
feat(app): migrate app parent view to react [EE-5361] (#10086)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
531f88b947
commit
841ca1ebd4
42 changed files with 1448 additions and 810 deletions
|
@ -4,17 +4,31 @@ import clsx from 'clsx';
|
|||
|
||||
import { Icon } from '@@/Icon';
|
||||
|
||||
type Size = 'xs' | 'sm' | 'md';
|
||||
|
||||
export type Props = {
|
||||
className: string;
|
||||
className?: string;
|
||||
size?: Size;
|
||||
};
|
||||
|
||||
const sizeStyles: Record<Size, string> = {
|
||||
xs: 'text-xs',
|
||||
sm: 'text-sm',
|
||||
md: 'text-md',
|
||||
};
|
||||
|
||||
export function InlineLoader({
|
||||
children,
|
||||
className,
|
||||
size = 'sm',
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
<div
|
||||
className={clsx('text-muted flex items-center gap-2 text-sm', className)}
|
||||
className={clsx(
|
||||
'text-muted flex items-center gap-2',
|
||||
className,
|
||||
sizeStyles[size]
|
||||
)}
|
||||
>
|
||||
<Icon icon={Loader2} className="animate-spin-slow" />
|
||||
{children}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue