loadingPanel.tsx 570 B

12345678910111213141516171819202122232425262728
  1. import * as React from 'react';
  2. import styled from '@emotion/styled';
  3. import LoadingMask from 'sentry/components/loadingMask';
  4. interface Props extends React.HTMLAttributes<HTMLDivElement> {
  5. height?: string;
  6. }
  7. const LoadingPanel = styled(({height: _height, ...props}: Props) => (
  8. <div {...props}>
  9. <LoadingMask />
  10. </div>
  11. ))`
  12. flex: 1;
  13. flex-shrink: 0;
  14. overflow: hidden;
  15. height: ${p => p.height};
  16. position: relative;
  17. border-color: transparent;
  18. margin-bottom: 0;
  19. `;
  20. LoadingPanel.defaultProps = {
  21. height: '200px',
  22. };
  23. export default LoadingPanel;