@iobroker/adapter-react-v5
Version:
React components to develop ioBroker interfaces with react.
40 lines (39 loc) • 1.3 kB
TypeScript
/**
* Copyright 2019-2024 Denis Haev (bluefox) <dogafox@gmail.com>
*
* MIT License
*
*/
import React, { Component, type JSX } from 'react';
interface DialogConfirmProps {
/** The dialog title; default: Are you sure? (translated) */
title?: string;
/** The dialog text */
text?: string | React.JSX.Element | React.JSX.Element[];
/** Close handler. */
onClose?: (ok: boolean) => void;
/** if the dialog must be fill sized */
fullWidth?: boolean;
/** optional icon */
icon?: React.JSX.Element;
/** optional ok button text */
ok?: string;
/** optional cancel button text */
cancel?: string;
/** optional interval in minutes for which the confirmation dialog will be suppressed if activated. */
suppressQuestionMinutes?: number;
/** optional text for the suppression checkbox */
suppressText?: string;
/** optional name of the dialog. Used only with suppressQuestionMinutes to store the user choice */
dialogName?: string;
}
interface DialogConfirmState {
suppress: number | boolean;
}
export declare class DialogConfirm extends Component<DialogConfirmProps, DialogConfirmState> {
constructor(props: DialogConfirmProps);
handleOk(): void;
handleCancel(): void;
render(): JSX.Element | null;
}
export {};