@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
55 lines (54 loc) • 2.87 kB
TypeScript
import React, { type ReactNode } from 'react';
import { type BoxProps } from '../Box/Box';
export { CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, MODAL_BOTTOM_BAR_IDS, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
interface DialogProps {
open: boolean;
onClose: () => void;
onAnimationComplete?: () => void;
titleId: string;
onMountAutoFocus?: (event: Event) => void;
children: ReactNode;
/** To hide the dialog without removing the object from the DOM **/
isHidden?: boolean;
/** Whether clicking outside the dialog or pressing escape key would close the modal */
isSmartCloseable?: boolean;
/** Whether side padding around the content of the modal should be applied */
withoutSidePadding?: boolean;
/** Whether bottom padding around the content of the modal should be applied */
withoutBottomPadding?: boolean;
/** Whether the transition animation should be used on open/close */
withTransition?: boolean;
}
/**
* Dialog components (title, content, bottom bar) must be rendered as direct children of Dialog for correct scrolling behavior
*/
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, }: DialogProps): React.ReactPortal | null;
export declare namespace Dialog {
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, helpButtonUrl, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
var Content: ({ children, fullHeight, paddingLeft, paddingBottom, paddingTop, className, withTopDivider, withBottomDivider, id, withoutInternalPadding, ...boxProps }: DialogContentProps) => React.JSX.Element;
var BottomSection: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
var BottomBar: ({ topSection, actionButtonProps, bottomSection, onClose, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
}
interface DialogContentProps extends BoxProps {
children: ReactNode;
/** Whether the content should fill all available space */
fullHeight?: boolean;
withTopDivider?: 'always' | 'scroll' | 'never';
withBottomDivider?: 'always' | 'scroll' | 'never';
id?: string;
/** Whether internal padding around the content of the modal should be applied */
withoutInternalPadding?: boolean;
}
export interface DialogTitleProps {
title?: string;
titleMeta?: string;
/** Can hide the close button, eg. when using a countdown element in its place */
hasCloseButton?: boolean;
isCloseDisabled?: boolean;
onClose?: () => void;
hasBackButton?: boolean;
helpButtonUrl?: string;
isBackDisabled?: boolean;
onBack?: () => void;
className?: string;
}