lucid-ui
Version:
A UI component library from Xandr.
116 lines • 4.26 kB
TypeScript
import React from 'react';
import PropTypes from 'prop-types';
import { IOverlayProps } from '../Overlay/Overlay';
import { StandardProps } from '../../util/component-types';
import { IButtonProps } from '../Button/Button';
export declare enum EnumSize {
small = "small",
medium = "medium",
large = "large"
}
declare type Size = keyof typeof EnumSize;
/** Dialog Header */
export interface IDialogHeaderProps extends StandardProps {
description?: string;
}
/** Dialog Footer */
export interface IDialogFooterProps extends StandardProps {
description?: string;
}
export interface IDialogProps extends IOverlayProps {
/** Size variations that only affect the width of the dialog. All the sizes
will grow in height until they get too big, at which point they will
scroll inside. */
size: Size;
/** If this is truthy (if a function is provided). the close button will show.
The function that is called when the close button is triggered. */
handleClose?: ({ event, props, }: {
event: React.MouseEvent;
props: IButtonProps;
}) => void;
/** Provides a more segregated design to organize more content in the Dialog.
* @default = false */
isComplex: boolean;
/** A true or false value that dictates whether or not the Body has padding. */
hasGutters: boolean;
/** *Child Element* - Header contents. Only one \`Header\` is used. */
Header?: string | (React.ReactNode & {
props: IDialogHeaderProps;
});
/** *Child Element* - Footer contents. Only one \`Footer\` is used. */
Footer?: string | (React.ReactNode & {
props: IDialogFooterProps;
});
}
export declare const Dialog: {
(props: IDialogProps): React.ReactElement;
displayName: string;
defaultProps: {
size: EnumSize;
isComplex: boolean;
hasGutters: boolean;
isAnimated: boolean;
isModal: boolean;
isShown: boolean;
onBackgroundClick: (...args: any[]) => void;
/** If this is truthy (if a function is provided). the close button will show.
The function that is called when the close button is triggered. */
onEscape: (...args: any[]) => void;
};
peek: {
description: string;
categories: string[];
extend: string;
madeFrom: string[];
};
propTypes: {
/**
Size variations that only affect the width of the dialog. All the sizes
will grow in height until they get too big, at which point they will
scroll inside.
*/
size: PropTypes.Requireable<string>;
/**
If this is truthy (if a function is provided). the close button will show.
The function that is called when the close button is triggered.
*/
handleClose: PropTypes.Requireable<(...args: any[]) => any>;
/**
Defaults to false.
Provides a more segregated design to organize more content in the Dialog.
*/
isComplex: PropTypes.Requireable<boolean>;
/**
A true or false value that dictates whether or not the Body has padding.
*/
hasGutters: PropTypes.Requireable<boolean>;
Header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
Footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
className: PropTypes.Requireable<string>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
isShown: PropTypes.Requireable<boolean>;
isAnimated: PropTypes.Requireable<boolean>;
isModal: PropTypes.Requireable<boolean>;
portalId: PropTypes.Requireable<string>;
onEscape: PropTypes.Requireable<(...args: any[]) => any>;
onBackgroundClick: PropTypes.Requireable<(...args: any[]) => any>;
};
Header: {
(_props: IDialogHeaderProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
};
Footer: {
(_props: IDialogFooterProps): null;
displayName: string;
peek: {
description: string;
};
propName: string;
};
};
export default Dialog;
//# sourceMappingURL=Dialog.d.ts.map