Sha256: e6c01cd6da805de0440f1da282770e85f97949e3924bbe45daaae48c8cd10c5d

Contents?: true

Size: 959 Bytes

Versions: 44

Compression:

Stored size: 959 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import {
  Bullseye,
  Title,
  EmptyState,
  EmptyStateIcon,
  Spinner,
  Skeleton,
} from '@patternfly/react-core';
import { translate as __ } from 'foremanReact/common/I18n';

const Loading = ({
  size, showText, loadingText, skeleton,
}) => {
  if (skeleton) {
    return <Skeleton height="100%" />;
  }
  return (
    <Bullseye>
      <EmptyState>
        <EmptyStateIcon size={size} variant="container" component={Spinner} />
        {showText && (
        <Title size={size} headingLevel="h4" ouiaId="loading-title">
          {loadingText || __('Loading')}
        </Title>)}
      </EmptyState>
    </Bullseye>
  );
};

Loading.propTypes = {
  size: PropTypes.string,
  showText: PropTypes.bool,
  loadingText: PropTypes.string,
  skeleton: PropTypes.bool,
};

Loading.defaultProps = {
  size: 'lg',
  showText: true,
  loadingText: null,
  skeleton: false,
};


export default Loading;

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/components/Loading.js
katello-4.15.0.rc1 webpack/components/Loading.js
katello-4.14.1 webpack/components/Loading.js
katello-4.14.0 webpack/components/Loading.js
katello-4.14.0.rc3 webpack/components/Loading.js
katello-4.14.0.rc2 webpack/components/Loading.js
katello-4.14.0.rc1.1 webpack/components/Loading.js
katello-4.14.0.rc1 webpack/components/Loading.js
katello-4.13.1 webpack/components/Loading.js
katello-4.13.0 webpack/components/Loading.js
katello-4.12.1 webpack/components/Loading.js
katello-4.13.0.rc1 webpack/components/Loading.js
katello-4.12.0 webpack/components/Loading.js
katello-4.12.0.rc3 webpack/components/Loading.js
katello-4.12.0.rc2 webpack/components/Loading.js
katello-4.12.0.rc1 webpack/components/Loading.js
katello-4.11.1 webpack/components/Loading.js
katello-4.11.0 webpack/components/Loading.js
katello-4.11.0.rc2 webpack/components/Loading.js
katello-4.11.0.rc1 webpack/components/Loading.js