@baseplate-dev/ui-components
Version:
Shared UI component library
25 lines • 890 B
TypeScript
import type React from 'react';
interface ErrorableLoaderProps {
/**
* Optional class name to be applied to the loader or error div
*/
className?: string;
/**
* Error to be displayed (if a string is passed, it will be displayed as-is, otherwise a generic error message will be displayed)
*/
error?: unknown;
/**
* Header to be displayed (if not passed, a generic error header will be displayed)
*/
header?: React.ReactNode;
/**
* Optional actions to be displayed below the error message
*/
actions?: React.ReactNode;
}
/**
* Displays a loader component that if an error is passed, it will display an error message instead.
*/
declare function ErrorableLoader({ className, error, header, actions, }: ErrorableLoaderProps): React.ReactElement;
export { ErrorableLoader };
//# sourceMappingURL=errorable-loader.d.ts.map