nudge-components-library
Version:
A library of nudge UI components
44 lines • 1.72 kB
TypeScript
import React from "react";
import "../../styles/tokens.css";
import "../../styles/globals.css";
import { TextBoxProps } from "../anchoring/TextBox";
export type ControlledTextBoxProps = {
value: string;
defaultValue?: never;
} & Omit<TextBoxProps, "value" | "defaultValue">;
type DialogPropsBase = {
id?: string;
title: string;
message: string | React.ReactNode;
visible?: boolean;
onClose?: () => void;
onOpen?: () => void;
autoClose?: boolean;
autoCloseDelay?: number;
animationType?: "fade" | "slide" | "none";
animationDuration?: number;
dismissible?: boolean;
closeOutside?: boolean;
confirmButtonText?: string;
cancelButtonText?: string;
onConfirm?: () => void;
onCancel?: () => void;
inputPlaceholder?: string;
confirmationValue?: string;
expectedInput?: string;
onInputChange?: (value: string) => void;
ariaLabel?: string;
inputProps?: Partial<TextBoxProps>;
};
type DialogPropsRequiresInput = DialogPropsBase & {
requiresInput: true;
confirmationPrompt: string;
};
type DialogPropsNoInput = DialogPropsBase & {
requiresInput?: false;
confirmationPrompt?: string;
};
export type DialogProps = DialogPropsRequiresInput | DialogPropsNoInput;
export declare function Dialog({ id, title, message, visible, onClose, onOpen, autoClose, autoCloseDelay, animationType, animationDuration, dismissible, closeOutside, confirmButtonText, cancelButtonText, onConfirm, onCancel, requiresInput, inputPlaceholder, confirmationValue, expectedInput, onInputChange, ariaLabel, inputProps, confirmationPrompt, }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
export {};
//# sourceMappingURL=Dialog.d.ts.map