@spaced-out/ui-design-system
Version:
Sense UI components library
51 lines • 2.02 kB
TypeScript
import * as React from 'react';
import type { UseTransitionStylesProps } from '@floating-ui/react';
type ClassNames = Readonly<{
container?: string;
content?: string;
backdrop?: string;
}>;
type FooterClassNames = Readonly<{
wrapper?: string;
actions?: string;
}>;
export interface ModalProps {
classNames?: ClassNames;
children?: React.ReactNode;
isOpen?: boolean;
onClose?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
hideBackdrop?: boolean;
tapOutsideToClose?: boolean;
allowBackgroundInteraction?: boolean;
initialFocus?: number;
customAnimation?: UseTransitionStylesProps;
testId?: string;
}
export type ModalSize = 'small' | 'medium' | 'large';
export interface BaseModalProps extends Omit<ModalProps, 'size'> {
size?: ModalSize;
}
export interface ModalHeaderProps {
children?: React.ReactNode;
hideCloseBtn?: boolean;
onCloseButtonClick?: React.MouseEventHandler<HTMLButtonElement>;
className?: string;
testId?: string;
}
export interface ModalFooterProps {
children?: React.ReactNode;
classNames?: FooterClassNames;
testId?: string;
}
export interface ModalBodyProps {
children?: React.ReactNode;
className?: string;
testId?: string;
}
export declare const ModalHeader: ({ children, hideCloseBtn, onCloseButtonClick, className, testId, }: ModalHeaderProps) => React.JSX.Element;
export declare const ModalBody: ({ children, className, testId }: ModalBodyProps) => React.JSX.Element;
export declare const ModalFooter: ({ children, classNames, testId, }: ModalFooterProps) => React.JSX.Element;
export declare const Modal: ({ classNames, children, isOpen, onClose, hideBackdrop, tapOutsideToClose, initialFocus, customAnimation, allowBackgroundInteraction, testId, size, }: BaseModalProps) => React.ReactPortal | null;
export declare const FullScreenModal: ({ classNames, testId, ...props }: ModalProps) => React.JSX.Element;
export {};
//# sourceMappingURL=Modal.d.ts.map