2020-02-19 08:10:40 +01:00
|
|
|
import React from 'react';
|
2020-02-19 09:14:11 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2020-03-16 13:37:10 +01:00
|
|
|
import { ClearIcon } from 'strapi-helper-plugin';
|
|
|
|
|
2020-03-24 22:57:41 +01:00
|
|
|
import LoadingIndicator from '../LoadingIndicator';
|
2020-03-16 13:37:10 +01:00
|
|
|
import IntlText from '../IntlText';
|
2020-02-19 08:10:40 +01:00
|
|
|
import Button from './Button';
|
2020-03-09 19:12:21 +01:00
|
|
|
import Container from './Container';
|
2020-02-19 08:10:40 +01:00
|
|
|
import Wrapper from './Wrapper';
|
|
|
|
|
2020-02-19 09:14:11 +01:00
|
|
|
const InfiniteLoadingIndicator = ({ onClick }) => {
|
2020-02-19 08:10:40 +01:00
|
|
|
return (
|
|
|
|
<Wrapper>
|
2020-03-09 19:12:21 +01:00
|
|
|
<Container>
|
2020-03-24 22:57:41 +01:00
|
|
|
<LoadingIndicator />
|
2020-03-09 19:12:21 +01:00
|
|
|
<Button type="button" onClick={onClick}>
|
2020-03-16 13:37:10 +01:00
|
|
|
<IntlText
|
|
|
|
as="span"
|
|
|
|
fontSize="xs"
|
|
|
|
fontWeight="semiBold"
|
|
|
|
color="grey"
|
|
|
|
id="app.components.Button.cancel"
|
|
|
|
/>
|
2020-03-09 19:12:21 +01:00
|
|
|
<ClearIcon />
|
|
|
|
</Button>
|
|
|
|
</Container>
|
2020-02-19 08:10:40 +01:00
|
|
|
</Wrapper>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-02-19 09:14:11 +01:00
|
|
|
InfiniteLoadingIndicator.defaultProps = {
|
|
|
|
onClick: () => {},
|
|
|
|
};
|
|
|
|
|
|
|
|
InfiniteLoadingIndicator.propTypes = {
|
|
|
|
onClick: PropTypes.func,
|
|
|
|
};
|
|
|
|
|
2020-02-19 08:10:40 +01:00
|
|
|
export default InfiniteLoadingIndicator;
|