import type { ReactNode } from 'react'; import tw from 'twin.macro'; import Spinner, { SpinnerSize } from '@/components/elements/Spinner'; interface Props { children?: ReactNode; visible: boolean; fixed?: boolean; size?: SpinnerSize; backgroundOpacity?: number; } function SpinnerOverlay({ size, fixed, visible, backgroundOpacity, children }: Props) { if (!visible) { return null; } return (
{children}
: children)}