2019-03-06 21:36:54 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { Component } from '@wordpress/element';
|
2019-03-06 22:16:38 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2020-12-21 19:06:26 +00:00
|
|
|
import { Card, CardBody, CardFooter, CardHeader } from '@wordpress/components';
|
2024-06-27 20:37:25 +00:00
|
|
|
import clsx from 'clsx';
|
2019-03-06 21:36:54 +00:00
|
|
|
|
|
|
|
class StoreAlertsPlaceholder extends Component {
|
|
|
|
render() {
|
2024-06-27 20:37:25 +00:00
|
|
|
const { hasMultipleAlerts, className } = this.props;
|
2019-03-06 21:36:54 +00:00
|
|
|
|
|
|
|
return (
|
2020-12-21 19:06:26 +00:00
|
|
|
<Card
|
2024-06-27 20:37:25 +00:00
|
|
|
className={ clsx(
|
|
|
|
'woocommerce-store-alerts is-loading',
|
|
|
|
className
|
|
|
|
) }
|
2020-02-14 02:23:21 +00:00
|
|
|
aria-hidden
|
2020-12-21 19:06:26 +00:00
|
|
|
size={ null }
|
2020-02-14 02:23:21 +00:00
|
|
|
>
|
2020-12-21 19:06:26 +00:00
|
|
|
<CardHeader isBorderless>
|
|
|
|
<span className="is-placeholder" />
|
|
|
|
{ hasMultipleAlerts && <span className="is-placeholder" /> }
|
|
|
|
</CardHeader>
|
|
|
|
<CardBody>
|
2019-03-06 21:36:54 +00:00
|
|
|
<div className="woocommerce-store-alerts__message">
|
|
|
|
<span className="is-placeholder" />
|
|
|
|
<span className="is-placeholder" />
|
|
|
|
</div>
|
2020-12-21 19:06:26 +00:00
|
|
|
</CardBody>
|
|
|
|
<CardFooter isBorderless>
|
|
|
|
<span className="is-placeholder" />
|
|
|
|
</CardFooter>
|
|
|
|
</Card>
|
2019-03-06 21:36:54 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default StoreAlertsPlaceholder;
|
2019-03-06 22:16:38 +00:00
|
|
|
|
|
|
|
StoreAlertsPlaceholder.propTypes = {
|
|
|
|
/**
|
|
|
|
* Whether multiple alerts exists.
|
|
|
|
*/
|
|
|
|
hasMultipleAlerts: PropTypes.bool,
|
|
|
|
};
|
|
|
|
|
|
|
|
StoreAlertsPlaceholder.defaultProps = {
|
|
|
|
hasMultipleAlerts: false,
|
|
|
|
};
|