mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 10:18:29 +08:00

* convert to use emotion object syntax * missed one * review comments * set back to 0 and disable lint rule
26 lines
555 B
TypeScript
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',
|
|
});
|