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

17 lines
450 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'}>
<Spinner centered={true} size={'normal'}/>
</div>
}
>
{children}
</Suspense>
);
2020-02-08 23:23:08 +00:00
export default SuspenseSpinner;