import Typography from "@mui/material/Typography"; import {useState} from "react"; import Box from "@mui/material/Box"; import {useTimeout} from "../hooks"; export type FuseLoadingProps = { delay?: number; className?: string; }; /** * FuseLoading displays a loading state with an optional delay */ function FuseLoading(props: FuseLoadingProps) { const {delay = 0, className} = props; const [showLoading, setShowLoading] = useState(!delay); useTimeout(() => { setShowLoading(true); }, delay); return (