index.tsx 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import React from "react";
  2. import styled from "styled-components";
  3. interface LoadingProps {
  4. message?: string;
  5. }
  6. const StyledLoading = styled.div`
  7. position: fixed;
  8. top: 0;
  9. left: 0;
  10. display: grid;
  11. place-content: center;
  12. width: 100%;
  13. height: 100vh;
  14. text-align: center;
  15. background: ${({ theme }) => theme.BLACK_DARK};
  16. z-index: 10;
  17. `;
  18. const StyledLogo = styled.h2`
  19. font-weight: 600;
  20. font-size: 56px;
  21. pointer-events: none;
  22. margin-bottom: 10px;
  23. `;
  24. const StyledText = styled.span`
  25. color: #faa81a;
  26. `;
  27. const StyledMessage = styled.div`
  28. color: #b9bbbe;
  29. font-size: 24px;
  30. font-weight: 500;
  31. `;
  32. export const Loading: React.FC<LoadingProps> = ({ message }) => {
  33. return (
  34. <StyledLoading>
  35. <StyledLogo>
  36. <StyledText>JSON</StyledText> Crack
  37. </StyledLogo>
  38. <StyledMessage>
  39. {message ?? "Preparing the environment for you..."}
  40. </StyledMessage>
  41. </StyledLoading>
  42. );
  43. };