You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/Widget/WidgetBody.tsx

25 lines
498 B

import clsx from 'clsx';
import { PropsWithChildren } from 'react';
import { useWidgetContext } from './Widget';
import { Loading } from './Loading';
interface Props {
loading?: boolean;
className?: string;
}
export function WidgetBody({
loading,
className,
children,
}: PropsWithChildren<Props>) {
useWidgetContext();
return (
<div className={clsx(className, 'widget-body')}>
{loading ? <Loading /> : <div className="widget-content">{children}</div>}
</div>
);
}