loadingPanel.tsx 538 B

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