@spaced-out/ui-design-system
Version:
Sense UI components library
64 lines • 2.2 kB
TypeScript
import * as React from 'react';
type ClassNames = Readonly<{
container?: string;
content?: string;
backdrop?: string;
}>;
export type UseTransitionStylesProps = {
duration?: number | {
open: number;
close: number;
};
initial?: {
readonly [key: string]: unknown;
};
open?: {
readonly [key: string]: unknown;
};
close?: {
readonly [key: string]: unknown;
};
common?: {
readonly [key: string]: unknown;
};
};
type FooterClassNames = Readonly<{
wrapper?: string;
actions?: string;
}>;
export type 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;
};
export type ModalSize = 'small' | 'medium' | 'large';
export type BaseModalProps = ModalProps & {
size?: ModalSize;
};
export type ModalHeaderProps = {
children?: React.ReactNode;
hideCloseBtn?: boolean;
onCloseButtonClick?: ((arg1: React.SyntheticEvent<HTMLElement>) => unknown) | null | undefined;
className?: string;
};
export type ModalFooterProps = {
children?: React.ReactNode;
classNames?: FooterClassNames;
};
export type ModalBodyProps = {
children?: React.ReactNode;
className?: string;
};
export declare const ModalHeader: ({ children, hideCloseBtn, onCloseButtonClick, className, }: ModalHeaderProps) => React.JSX.Element;
export declare const ModalBody: ({ children, className }: ModalBodyProps) => React.JSX.Element;
export declare const ModalFooter: ({ children, classNames }: ModalFooterProps) => React.JSX.Element;
export declare const Modal: ({ classNames, children, isOpen, onClose, hideBackdrop, tapOutsideToClose, initialFocus, customAnimation, allowBackgroundInteraction, size, }: BaseModalProps) => React.ReactPortal | null;
export declare const FullScreenModal: ({ classNames, ...props }: ModalProps) => React.JSX.Element;
export {};
//# sourceMappingURL=Modal.d.ts.map