UNPKG

@spaced-out/ui-design-system

Version:
51 lines 2.15 kB
import * as React from 'react'; import type { ModalProps } from '../../components/Modal'; type FooterClassNames = Readonly<{ wrapper?: string; actions?: string; }>; export declare const DIALOG_SEMANTIC: Readonly<{ neutral: "neutral"; success: "success"; information: "information"; warning: "warning"; danger: "danger"; }>; export type DialogSemanticType = (typeof DIALOG_SEMANTIC)[keyof typeof DIALOG_SEMANTIC]; export interface DialogHeaderProps { children?: React.ReactNode; className?: string; testId?: string; } export interface DialogFooterProps { children?: React.ReactNode; classNames?: FooterClassNames; testId?: string; } export interface DialogBodyProps { children?: React.ReactNode; className?: string; testId?: string; } export type DialogPropsBase = ModalProps; export interface DialogProps extends Omit<DialogPropsBase, 'semantic' | 'iconName'> { semantic?: DialogSemanticType; iconName?: string; testId?: string; } export interface BasicDialogProps extends Omit<DialogProps, 'heading' | 'body' | 'confirmText' | 'abortText' | 'handleConfirm' | 'handleAbort'> { heading?: React.ReactNode; body?: React.ReactNode; confirmText?: string; abortText?: string; handleConfirm?: (event: React.SyntheticEvent) => unknown; handleAbort?: (event: React.SyntheticEvent) => unknown; testId?: string; } export declare const DialogHeader: ({ children, className, testId, }: DialogHeaderProps) => React.JSX.Element; export declare const DialogBody: ({ children, className, testId }: DialogBodyProps) => React.JSX.Element; export declare const DialogFooter: ({ children, classNames, testId, }: DialogFooterProps) => React.JSX.Element; export declare const Dialog: ({ children, isOpen, hideBackdrop, onClose, tapOutsideToClose, iconName, semantic, classNames, testId, ...restDialogProps }: DialogProps) => React.JSX.Element; export declare const BasicDialog: ({ heading, body, confirmText, abortText, handleConfirm, handleAbort, testId, ...restDialogProps }: BasicDialogProps) => React.JSX.Element; export {}; //# sourceMappingURL=Dialog.d.ts.map