Files
grafana/public/app/features/logs/components/LoadingIndicator.tsx
Ashley Harrison b23b6d228a Chore: Convert styles to use emotion object syntax (#94989)
* convert to use emotion object syntax

* missed one

* review comments

* set back to 0 and disable lint rule
2024-10-23 15:25:28 +01:00

26 lines
555 B
TypeScript

import { css } from '@emotion/css';
import { Spinner } from '@grafana/ui';
// ideally we'd use `@grafana/ui/LoadingPlaceholder`, but that
// one has a large margin-bottom.
type Props = {
adjective?: string;
};
export const LoadingIndicator = ({ adjective = 'newer' }: Props) => {
const text = `Loading ${adjective} logs...`;
return (
<div className={loadingIndicatorStyles}>
<div>
{text} <Spinner inline />
</div>
</div>
);
};
const loadingIndicatorStyles = css({
display: 'flex',
justifyContent: 'center',
});