misc_pterodactyl-panel/resources/scripts/components/elements/SuspenseSpinner.tsx
2020-07-04 12:39:55 -07:00

16 lines
427 B
TypeScript

import React, { Suspense } from 'react';
import Spinner from '@/components/elements/Spinner';
const SuspenseSpinner = ({ children }: { children?: React.ReactNode }) => (
<Suspense
fallback={
<div className={'mx-4 w-3/4 mr-4 flex items-center justify-center'}>
<Spinner centered/>
</div>
}
>
{children}
</Suspense>
);
export default SuspenseSpinner;