/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Component, Fragment } from '@wordpress/element';
import PropTypes from 'prop-types';
import Gridicon from 'gridicons';
import classNames from 'classnames';
import {
Button,
Placeholder,
Spinner,
} from '@wordpress/components';
/**
* Internal dependencies
*/
class ApiErrorPlaceholder extends Component {
constructor() {
super( ...arguments );
this.state = {
retrying: false,
};
this.onRetry = this.onRetry.bind( this );
}
onRetry() {
const { onRetry } = this.props;
this.setState( { retrying: true } );
onRetry();
}
render() {
const { onRetry, errorMessage, className } = this.props;
const { retrying } = this.state;
return (