@unicity/design-system
Version:
A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support
119 lines • 2.46 kB
TypeScript
import React from 'react';
export interface DialogAction {
/**
* Action label
*/
label: string;
/**
* Click handler
*/
onClick?: () => void;
/**
* Button variant
*/
variant?: 'text' | 'outlined' | 'contained';
/**
* Button color
*/
color?: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
/**
* Whether action is disabled
*/
disabled?: boolean;
/**
* Whether this is a loading action
*/
loading?: boolean;
/**
* Whether to auto-focus this action
*/
autoFocus?: boolean;
/**
* Icon for the action
*/
icon?: React.ReactNode;
}
export interface DialogProps {
/**
* Whether dialog is open
*/
open: boolean;
/**
* Callback fired when dialog should close
*/
onClose?: () => void;
/**
* Dialog title
*/
title?: React.ReactNode;
/**
* Dialog subtitle
*/
subtitle?: string;
/**
* Dialog content
*/
children?: React.ReactNode;
/**
* Content text (alternative to children)
*/
content?: string;
/**
* Dialog variant
*/
variant?: 'default' | 'alert' | 'confirmation' | 'form';
/**
* Dialog size
*/
size?: 'small' | 'medium' | 'large' | 'fullscreen';
/**
* Dialog actions
*/
actions?: DialogAction[];
/**
* Whether to show close button
*/
showCloseButton?: boolean;
/**
* Close button label for accessibility
*/
closeButtonLabel?: string;
/**
* Whether dialog can be closed by clicking backdrop
*/
disableBackdropClick?: boolean;
/**
* Whether dialog can be closed by pressing escape
*/
disableEscapeKeyDown?: boolean;
/**
* Transition animation
*/
transition?: 'slide' | 'zoom' | 'fade' | 'none';
/**
* Maximum width
*/
maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
/**
* Whether to take full width
*/
fullWidth?: boolean;
/**
* Whether to take full screen on mobile
*/
fullScreen?: boolean;
/**
* Icon to display in header
*/
icon?: React.ReactNode;
/**
* Whether dialog is scrollable
*/
scroll?: 'paper' | 'body';
/**
* Custom styling
*/
sx?: any;
}
export declare const Dialog: React.FC<DialogProps>;
//# sourceMappingURL=Dialog.d.ts.map