infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
78 lines • 1.76 kB
TypeScript
import * as React from "react";
export interface ModalProps {
/**
* Whether the modal is open
*/
isOpen: boolean;
/**
* Callback when the modal should close
*/
onClose: () => void;
/**
* Modal title - optional
*/
title?: string;
/**
* Modal description/subtitle - optional
*/
description?: string;
/**
* Modal footer content - optional
*/
footer?: React.ReactNode;
/**
* Modal body content
*/
children: React.ReactNode;
/**
* Size variant
*/
size?: "small" | "medium" | "large" | "xlarge";
/**
* Whether to show the close button in header
*/
showCloseButton?: boolean;
/**
* Whether clicking the overlay closes the modal
*/
closeOnOverlayClick?: boolean;
/**
* Whether pressing Escape closes the modal
*/
closeOnEscape?: boolean;
/**
* Custom class name for the modal container
*/
className?: string;
/**
* Custom class name for the modal content
*/
contentClassName?: string;
/**
* Custom class name for the header
*/
headerClassName?: string;
/**
* Custom class name for the body
*/
bodyClassName?: string;
/**
* Custom class name for the footer
*/
footerClassName?: string;
/**
* Custom class name for the overlay
*/
overlayClassName?: string;
/**
* ARIA label for accessibility
*/
ariaLabel?: string;
/**
* ARIA description for accessibility
*/
ariaDescribedBy?: string;
}
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
export { Modal };
//# sourceMappingURL=Modal.d.ts.map