@cbinsights/fds
Version:
Form: A design system by CB Insights
24 lines (23 loc) • 973 B
TypeScript
import React from 'react';
import { ButtonProps } from 'components/Button';
export interface PromptProps {
/** Controls text in header */
title?: string;
/** Controls string displayed in content area */
desc?: React.ReactNode | string;
/** Represents primary button (MUST be an FDS Button) */
primaryButton: React.ReactElement<ButtonProps>;
/** Represents secondary button (MUST be an FDS Button) */
secondaryButton: React.ReactElement<ButtonProps>;
/** Controls whether modal (and backdrop) are visible or not */
isOpen?: boolean;
/**
* Callback that user can pass in, to be conditionally fired when
* user attempts to close modal. When defined, the modal close button appears
*/
onDismiss?: () => void;
/** Keeps the Prompt from being rendered in a portal and renders it locally instead. */
disablePortal?: boolean;
}
declare const Prompt: (props: PromptProps) => JSX.Element;
export default Prompt;