Same folder name between presentational and smart components

This commit is contained in:
Sanne Raymaekers 2020-12-17 13:14:04 +01:00
parent e814ae1bb8
commit 1883a065f7
5 changed files with 4 additions and 4 deletions

View file

@ -1,74 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Flex, Spinner } from '@patternfly/react-core';
import { CheckCircleIcon, PendingIcon, ExclamationCircleIcon } from '@patternfly/react-icons';
import './ImageBuildStatus.scss';
const ImageBuildStatus = (props) => {
const messages = {
success: [
{
icon: <CheckCircleIcon className="success" />,
text: 'Ready'
}
],
failure: [
{
icon: <ExclamationCircleIcon className="error" />,
text: 'Image build failed'
}
],
pending: [
{
icon: <PendingIcon />,
text: 'Image build, Upload, Cloud registration pending'
}
],
building: [
{
icon: <Spinner size="md" />,
text: 'Image build in progress'
},
{
icon: <PendingIcon />,
text: 'Upload, Cloud registration pending'
}
],
uploading: [
{
icon: <Spinner size="md" />,
text: 'Upload in progress'
},
{
icon: <PendingIcon />,
text: 'Cloud registration pending'
}
],
registering: [
{
icon: <Spinner size="md" />,
text: 'Cloud registration in progress'
}
]
};
return (
<React.Fragment>
{messages[props.status] &&
messages[props.status].map((message, key) => (
<Flex key={ key } className="pf-u-align-items-baseline pf-m-nowrap">
<div>{message.icon}</div>
<small>{message.text}</small>
</Flex>
))
}
</React.Fragment>
);
};
ImageBuildStatus.propTypes = {
status: PropTypes.string,
};
export default ImageBuildStatus;