UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

21 lines (18 loc) 832 B
import * as react_jsx_runtime from 'react/jsx-runtime'; import { PropsWithChildren, ReactNode } from 'react'; type LoadingAndErrorComponentProps = PropsWithChildren<{ isLoading?: boolean; hasError?: boolean; loadingComponent?: ReactNode; errorComponent?: ReactNode; /** * in milliseconds */ minimumLoadingDuration?: number; className?: string; }>; /** * A Component that shows the Error and Loading animation, when appropriate and the children otherwise */ declare const LoadingAndErrorComponent: ({ children, isLoading, hasError, loadingComponent, errorComponent, minimumLoadingDuration, className }: LoadingAndErrorComponentProps) => string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element; export { LoadingAndErrorComponent, type LoadingAndErrorComponentProps };