Add simple Spinner overlay component

This commit is contained in:
Philipp Stracker 2024-11-07 13:23:07 +01:00
parent 9d845e56f3
commit 4af29a5dc2
No known key found for this signature in database
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,16 @@
.ppcp-r-spinner-overlay {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
background: var(--spinner-overlay-color);
.components-spinner {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}

View file

@ -18,6 +18,7 @@
@import './components/reusable-components/title-badge';
@import './components/reusable-components/accordion-section';
@import './components/reusable-components/badge-box';
@import './components/reusable-components/spinner-overlay';
@import './components/screens/onboarding';
@import './components/screens/dashboard/tab-dashboard';
@import './components/screens/dashboard/tab-payment-methods';

View file

@ -0,0 +1,11 @@
import { Spinner } from '@wordpress/components';
const SpinnerOverlay = () => {
return (
<div className="ppcp-r-spinner-overlay">
<Spinner />
</div>
);
};
export default SpinnerOverlay;