MDK Logo

AlertConfirmationModal

Modal that confirms acknowledging or clearing one or more alerts before applying the change.

Modal that confirms acknowledging or clearing one or more alerts before applying the change.

import { AlertConfirmationModal } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
isOpenRequiredboolean
onOkRequiredVoidFunction

Usage

Confirmation dialog that appears before acknowledging or clearing one or more alerts. Prevents accidental bulk-clear actions.

Example

import { useState } from 'react'import { AlertConfirmationModal } from '@tetherto/mdk-react-devkit'export const AlertConfirmationModalExample = () => {  const [open, setOpen] = useState(false)  return (    <div className="mdk-example-row">      <button onClick={() => setOpen(true)}>Clear All Alerts</button>      <AlertConfirmationModal        isOpen={open}        onOk={() => {          console.warn('confirmed')          setOpen(false)        }}      />    </div>  )}