import React from "react"; import styled from "styled-components"; import { CircularProgress } from "@material-ui/core"; import { useTheme } from "@fiftyone/components"; const IconDiv = styled.div` position: absolute; top: 50%; right: 50%; & > svg { color: ${({ theme }) => theme.font}; } `; const Loading = React.memo( ({ loading = true, size = 32 }: { loading?: boolean; size?: number }) => { const theme = useTheme(); return ( {loading && ( )} ); } ); export default Loading;