|
@@ -1,10 +1,19 @@
|
|
import React from "react";
|
|
import React from "react";
|
|
-import styled from "styled-components";
|
|
|
|
|
|
+import styled, { keyframes } from "styled-components";
|
|
|
|
|
|
interface LoadingProps {
|
|
interface LoadingProps {
|
|
message?: string;
|
|
message?: string;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const fadeIn = keyframes`
|
|
|
|
+ 99% {
|
|
|
|
+ visibility: hidden;
|
|
|
|
+ }
|
|
|
|
+ 100% {
|
|
|
|
+ visibility: visible;
|
|
|
|
+ }
|
|
|
|
+`;
|
|
|
|
+
|
|
const StyledLoading = styled.div`
|
|
const StyledLoading = styled.div`
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 0;
|
|
top: 0;
|
|
@@ -17,6 +26,10 @@ const StyledLoading = styled.div`
|
|
background: ${({ theme }) => theme.BLACK_DARK};
|
|
background: ${({ theme }) => theme.BLACK_DARK};
|
|
z-index: 36;
|
|
z-index: 36;
|
|
pointer-events: none;
|
|
pointer-events: none;
|
|
|
|
+ animation: 0.5s ${fadeIn};
|
|
|
|
+ animation-fill-mode: forwards;
|
|
|
|
+
|
|
|
|
+ visibility: hidden;
|
|
`;
|
|
`;
|
|
|
|
|
|
const StyledLogo = styled.h2`
|
|
const StyledLogo = styled.h2`
|