kibana/packages/kbn-panel-loader/index.tsx
Devon Thomson 64ebaffd89
[Embeddable Refactor] Create Decoupled Presentation Panel (#172017)
Closes https://github.com/elastic/kibana/issues/167426
Closes https://github.com/elastic/kibana/issues/167890

Contains much of the prep work required to decouple the Embeddables system from Kibana in anticipation of its deprecation and removal.

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
2024-01-17 17:13:02 -05:00

35 lines
1 KiB
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React from 'react';
import { EuiLoadingChart, EuiPanel } from '@elastic/eui';
import { css } from '@emotion/react';
export const PanelLoader = (props: { showShadow?: boolean; dataTestSubj?: string }) => {
return (
<EuiPanel
css={css`
z-index: auto;
flex: 1;
display: flex;
flex-direction: column;
height: 100%;
min-height: $euiSizeL + 2px;
position: relative;
justify-content: center;
align-items: center;
`}
role="figure"
paddingSize="none"
hasShadow={props.showShadow ?? false}
data-test-subj={props.dataTestSubj}
>
<EuiLoadingChart size="l" mono />
</EuiPanel>
);
};