import { CSSProperties } from 'react' type LoadingBrandedTypes = { loadProgress: number // Percentage label?: string hasError?: boolean } export default function LoadingBranded({ loadProgress, label, hasError = false, }: LoadingBrandedTypes) { // Drive the colour reveal from the load progress: the four circles start // de-saturated and "warm up" to full colour as the project loads, while // each circle keeps drifting on its own little orbit (see the CSS). const saturation = Math.max(0, Math.min(1, loadProgress / 100)) return ( <>
V
{!hasError && (
{label}
)} ) }