@kelvininc/react-ui-components
Version:
Kelvin UI Components for React applications
15 lines (14 loc) • 627 B
TypeScript
import React, { PropsWithChildren } from 'react';
import type { IToaster, JSX } from '@kelvininc/ui-components';
export type ToasterContainerProps = {
rootId?: string;
isOpen: boolean;
} & JSX.KvToaster;
export interface IToasterController {
isOpen: boolean;
config: IToaster;
openToaster: (newConfig: IToaster) => void;
closeToaster: () => void;
}
export declare function useToaster(initialConfig?: IToaster, initialState?: boolean): IToasterController;
export declare function ToasterContainer({ rootId, isOpen, children, ...otherProps }: PropsWithChildren<ToasterContainerProps>): React.ReactPortal;