Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

ConfirmModalProps interface

Signature

typescript
export interface ConfirmModalProps 

Import

typescript
import { ConfirmModalProps } from '@grafana/ui';

Properties

PropertyTypeDescription
alternativeTextstringText for alternative button
bodyReact.ReactNodeModal content
confirmationTextstringText user needs to fill in before confirming
confirmTextstringText for confirm button
descriptionReact.ReactNodeModal description
dismissTextstringText for dismiss button
iconIconNameIcon for the modal header
isOpenbooleanToggle modal’s open/closed state
titlestringTitle for the modal header

Methods

MethodDescription
onAlternative()Alternative action callback
onConfirm()Confirm action callback
onDismiss()Dismiss action callback

alternativeText property

Text for alternative button

Signature

typescript
alternativeText?: string;

body property

Modal content

Signature

typescript
body: React.ReactNode;

confirmationText property

Text user needs to fill in before confirming

Signature

typescript
confirmationText?: string;

confirmText property

Text for confirm button

Signature

typescript
confirmText: string;

description property

Modal description

Signature

typescript
description?: React.ReactNode;

dismissText property

Text for dismiss button

Signature

typescript
dismissText?: string;

icon property

Icon for the modal header

Signature

typescript
icon?: IconName;

isOpen property

Toggle modal’s open/closed state

Signature

typescript
isOpen: boolean;

title property

Title for the modal header

Signature

typescript
title: string;

onAlternative method

Alternative action callback

Signature

typescript
onAlternative?(): void;

Returns:

void

onConfirm method

Confirm action callback

Signature

typescript
onConfirm(): void;

Returns:

void

onDismiss method

Dismiss action callback

Signature

typescript
onDismiss(): void;

Returns:

void