feat(dashboard-v2): introduce a loading indicator

This commit is contained in:
Michał Leszczyk 2022-03-04 13:52:31 +01:00
parent f1262fb8f7
commit b060556d3c
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
import styled from "styled-components";
import { CircledProgressIcon } from "../Icons";
/**
* This loading indicator is designed to be replace entire blocks (i.e. components)
* while they are fetching required data.
*
* It will take 50% of the parent's height, but won't get bigger than 150x150 px.
*/
const Wrapper = styled.div.attrs({
className: "flex w-full h-full justify-center items-center p-8 text-palette-100",
})``;
export const ContainerLoadingIndicator = (props) => (
<Wrapper {...props}>
<CircledProgressIcon size="50%" className="max-w-[150px] max-h-[150px] animate-[spin_3s_linear_infinite]" />
</Wrapper>
);

View File

@ -0,0 +1 @@
export * from "./ContainerLoadingIndicator";