misc_pterodactyl-panel/resources/scripts/components/elements/SuspenseSpinner.tsx

17 lines
427 B
TypeScript
Raw Normal View History

import React, { Suspense } from 'react';
import Spinner from '@/components/elements/Spinner';
2020-02-08 23:23:08 +00:00
const SuspenseSpinner = ({ children }: { children?: React.ReactNode }) => (
<Suspense
fallback={
<div className={'mx-4 w-3/4 mr-4 flex items-center justify-center'}>
2020-07-04 19:39:55 +00:00
<Spinner centered/>
</div>
}
>
{children}
</Suspense>
);
2020-02-08 23:23:08 +00:00
export default SuspenseSpinner;