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