StatusScreen.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import Image from 'next/image';
  2. import React from 'react';
  3. import { getUrl } from '../../core/helpers/url-helpers';
  4. import { Button } from '../ui/Button';
  5. interface IProps {
  6. title: string;
  7. subtitle: string;
  8. onAction?: () => void;
  9. actionTitle?: string;
  10. loading?: boolean;
  11. }
  12. export const StatusScreen: React.FC<IProps> = ({ title, subtitle, onAction, actionTitle, loading = true }) => (
  13. <div className="page page-center">
  14. <div className="container container-tight py-4 d-flex align-items-center flex-column">
  15. <Image
  16. alt="Tipi log"
  17. className="mb-3"
  18. src={getUrl('tipi.png')}
  19. height={50}
  20. width={50}
  21. style={{
  22. maxWidth: '100%',
  23. height: 'auto',
  24. }}
  25. />
  26. <h1 className="text-center mb-1">{title}</h1>
  27. <div className="text-center text-muted mb-3">{subtitle}</div>
  28. {loading && <div className="spinner-border spinner-border-sm text-muted" />}
  29. {onAction && (
  30. <div className="empty-action">
  31. <Button onClick={onAction} className="btn">
  32. {actionTitle}
  33. </Button>
  34. </div>
  35. )}
  36. </div>
  37. </div>
  38. );