@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
36 lines (35 loc) • 1.11 kB
TypeScript
import type { ReactNode } from 'react';
import type { SharedStateId } from '../../../../shared/helpers/useSharedState';
import type { InfoOverlayContent } from './setContent';
export type FormInfoOverlayProps = {
/**
* The content to show.
* If not given, the children will be shown.
* Can be `success`, `error` or a custom content.
*/
content?: InfoOverlayContent;
onCancel?: () => void;
/** Predefined content */
success?: {
title?: ReactNode;
description?: ReactNode;
buttonText?: ReactNode;
buttonHref?: string;
buttonClickHandler?: () => void;
};
/** Predefined content */
error?: {
title?: ReactNode;
description?: ReactNode;
retryButton?: ReactNode;
cancelButton?: ReactNode;
};
id?: SharedStateId;
children: ReactNode;
className?: string;
};
declare function InfoOverlay(props: FormInfoOverlayProps): import("react/jsx-runtime").JSX.Element;
declare namespace InfoOverlay {
var setContent: typeof import("./setContent").default;
}
export default InfoOverlay;