This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/uiConfirmModalProps

ConfirmModalProps interface

Signature

export interface ConfirmModalProps 

Import

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

Properties

Property Type Description
alternativeText string Text for alternative button
body React.ReactNode Modal content
confirmationText string Text user needs to fill in before confirming
confirmText string Text for confirm button
description React.ReactNode Modal description
dismissText string Text for dismiss button
icon IconName Icon for the modal header
isOpen boolean Toggle modal’s open/closed state
title string Title for the modal header

Methods

Method Description
onAlternative() Alternative action callback
onConfirm() Confirm action callback
onDismiss() Dismiss action callback

alternativeText property

Text for alternative button

Signature

alternativeText?: string;

body property

Modal content

Signature

body: React.ReactNode;

confirmationText property

Text user needs to fill in before confirming

Signature

confirmationText?: string;

confirmText property

Text for confirm button

Signature

confirmText: string;

description property

Modal description

Signature

description?: React.ReactNode;

dismissText property

Text for dismiss button

Signature

dismissText?: string;

icon property

Icon for the modal header

Signature

icon?: IconName;

isOpen property

Toggle modal’s open/closed state

Signature

isOpen: boolean;

title property

Title for the modal header

Signature

title: string;

onAlternative method

Alternative action callback

Signature

onAlternative?(): void;

Returns:

void

onConfirm method

Confirm action callback

Signature

onConfirm(): void;

Returns:

void

onDismiss method

Dismiss action callback

Signature

onDismiss(): void;

Returns:

void