@praetorian-chariot/ui
Version:
The UI component library for Chariot, built with Tailwind CSS and React.
55 lines • 1.7 kB
TypeScript
import React, { PropsWithChildren, ReactNode } from 'react';
import { ButtonProps } from './Button';
type Size = 'xs' | 'lg' | 'xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
export interface ModalProps extends PropsWithChildren {
className?: string;
baseClassName?: string;
bodyClassName?: string;
hideFooter?: boolean;
footer?: {
baseClassName?: string;
styleType?: ButtonProps['styleType'];
text?: string;
onClick?: () => void;
left?: React.ReactElement;
form?: string;
className?: string;
isLoading?: boolean;
startIcon?: React.ReactNode;
endIcon?: React.ReactNode;
disabled?: boolean;
disconnect?: {
text?: string;
onClick?: () => void;
disabled?: boolean;
isLoading?: boolean;
};
hideCancelButton?: boolean;
};
logo?: string;
icon?: React.ReactNode;
onClose: () => void;
hideClose?: boolean;
open: boolean;
size?: Size;
title: ReactNode;
subtitle?: ReactNode;
style?: 'default' | 'dialog';
closeOnOutsideClick?: boolean;
}
/**
* This is Portal ID where headless UI renders the Dialog
* Ref: https://headlessui.com/react/dialog#rendering-to-a-portal
*/
export declare const MODAL_WRAPPER_ID = "headlessui-portal-root";
export declare const Modal: React.FC<ModalProps>;
interface ModalWrapperProps extends PropsWithChildren {
className?: string;
open: boolean;
size?: Size;
onClose: () => void;
closeOnOutsideClick?: boolean;
}
export declare const ModalWrapper: React.FC<ModalWrapperProps>;
export {};
//# sourceMappingURL=Modal.d.ts.map