nudge-components-library
Version:
A library of nudge UI components
37 lines • 1.29 kB
TypeScript
import React from "react";
import "../../styles/tokens.css";
import "../../styles/globals.css";
type BasePopupProps = {
id?: string;
title?: string;
message?: string;
visible?: boolean;
onClose?: () => void;
onOpen?: () => void;
autoClose?: boolean;
autoCloseDelay?: number;
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
renderContent?: () => React.ReactNode;
ariaLabel?: string;
animationType?: "fade" | "slide" | "none";
animationDuration?: number;
dismissible?: boolean;
closeOutside?: boolean;
image?: string | false | null | {
src: string;
[key: string]: any;
};
buttonText?: string;
onButtonClick?: () => void;
};
type AutoCloseProps = {
autoClose?: false;
autoCloseDelay?: never;
} | {
autoClose: true;
autoCloseDelay: number;
};
export type PopupProps = BasePopupProps & AutoCloseProps;
export declare function Popup({ id, title, message, visible, onClose, onOpen, autoClose, autoCloseDelay, position, renderContent, ariaLabel, animationType, animationDuration, dismissible, closeOutside, image: providedImage, buttonText, onButtonClick, }: PopupProps): import("react/jsx-runtime").JSX.Element | null;
export {};
//# sourceMappingURL=Popup.d.ts.map