import React from 'react' import type { ReactNode } from 'react' import { Classes } from './styles' const DefaultLoadingIcon = React.memo(() => ( )) export interface LoadingContentWrapperProps { visible: boolean children: ReactNode } function DefaultLoadingContentWrapper({ children, visible }: LoadingContentWrapperProps) { return (
{children}
) } interface LoadingProps { visible: boolean children: ReactNode LoadingContentWrapper?: React.ComponentType LoadingIcon?: React.ComponentType } export default function Loading({ visible, children, LoadingContentWrapper = DefaultLoadingContentWrapper, LoadingIcon = DefaultLoadingIcon, }: LoadingProps) { return (
{visible && (
)}
) }