UNPKG

react-healthy

Version:

Incrementally check and alert your users to the health of your APIs

25 lines 977 B
/// <reference types="react" /> import type { Api, ApiResponse, BannerMessages } from '../../types'; export declare type HealthyProps = { config: HealthyConfig; }; export declare type HealthyConfig = { /** An array of API objects */ apis: Api[]; /** A callback that's called after the component handles the error, for additional error handling */ onError?: (api: ApiResponse) => void; /** The interval at which to call the APIs in milliseconds; default is 30 seconds (30000) */ interval?: number; /** CSS class names to assign to the banner, banner content, and close button */ classes?: { banner?: string; content?: string; closeButton?: string; }; messages?: BannerMessages; /** Whether or not to show a close icon - default is false */ closeable?: boolean; }; export declare function Healthy({ config }: HealthyProps): JSX.Element | null; export default Healthy; //# sourceMappingURL=index.d.ts.map