@wix/design-system
Version:
@wix/design-system
61 lines • 3.69 kB
TypeScript
import type { ReactNode, CSSProperties } from 'react';
import type { BaseModalLayoutProps, ModalSkin } from '../BaseModalLayout';
import type { TooltipCommonProps } from '../common';
import type { ButtonProps, ButtonSize } from '../Button';
import type { TooltipProps } from '../Tooltip';
/** @deprecated it's not a valid CSS overflow property value */
type InvalidOverflowNone = 'none';
export interface CustomModalLayoutProps extends BaseModalLayoutProps {
/** Sets text title for the modal; can be used in conjunction with other components */
title?: ReactNode;
/** Sets text subtitle for the modal; can be used in conjunction with other components */
subtitle?: ReactNode;
/** Contains all modal's content in its middle area. `<CustomModalLayout/>` children are passed as `content`, too.*/
content?: ReactNode;
/** Sets text label or other content (e.g., <Loader/>) for the primary button */
primaryButtonText?: ReactNode;
/** Passes on any `<Button/>` properties on the primary button */
primaryButtonProps?: Omit<ButtonProps, 'internalDataHook'>;
/** Defines a call-back function after user clicks on the primary button */
primaryButtonOnClick?(): void;
/** Passes on any `<Tooltip/>` properties on the primary button tooltip */
primaryButtonTooltipProps?: TooltipCommonProps & {
content: TooltipProps['content'];
};
/** Sets text label for the secondary button */
secondaryButtonText?: ReactNode;
/** Passes on any `<Button/>` properties on the secondary button */
secondaryButtonProps?: Omit<ButtonProps, 'internalDataHook'>;
/** Defines a call-back function after user clicks on the secondary button */
secondaryButtonOnClick?(): void;
/** Sets the size of action buttons */
actionsSize?: ButtonSize;
/** Contains a checkbox or other components at the start of the footer */
sideActions?: ReactNode;
/** Renders supplementary text or other components at the bottom of the modal */
footnote?: ReactNode;
/** Sets the look and feel of the footnote */
footnoteSkin?: 'neutral' | 'light';
/** Fixes the width of component; if content area is wider than `width`, it scrolls horizontally */
width?: CSSProperties['width'];
/** Sets the maximum width of component; if content area is longer than maxWidth, it scrolls horizontally */
maxWidth?: CSSProperties['maxWidth'];
/** Fixes the height of component */
height?: CSSProperties['height'];
/** Sets the maximum height of component; if content area is longer than maxHeight, it scrolls vertically */
maxHeight?: CSSProperties['maxHeight'];
/** Removes 30 px left and right padding from the content area */
removeContentPadding?: boolean;
/** Controls visibility of a header divider. When set to `auto`, it is shown only when scroll position is greater than 0. When set to `true`, it is always visible, and when set to `false`, it is always hidden. */
showHeaderDivider?: 'auto' | boolean;
/** Controls visibility of a footer divider. When set to `auto`, it is shown up until content is scrolled to the very bottom. When set to `true`, it is always visible, and when set to `false`, it is always hidden.*/
showFooterDivider?: 'auto' | boolean;
/** Determines what happens when content overflows component vertically. Value 'none' will be removed in next major, use "visible" value instead. */
overflowY?: CSSProperties['overflowY'] | InvalidOverflowNone;
/** Sets object of CSS styles */
style?: CSSProperties;
/** @deprecated use skin prop instead */
theme?: ModalSkin;
}
export {};
//# sourceMappingURL=CustomModalLayout.types.d.ts.map