Message Pop Up

The Message Pop Up component renders a message popup with options for confirmation and cancellation.

Usage & Examples

Default

default.tsx
<button onClick={() => setOpen(true)}>Show Popup</button>
  {open && (
    <MessagePopup
      message="Are you sure you want to delete this item?"
      onClose={() => setOpen(false)}
      onConfirm={() => {
        alert("Confirmed!");
        setOpen(false);
      }}
      onCancel={() => {
        alert("Cancelled!");
        setOpen(false);
      }}
    />
  )}

none rounding

none-rounding.tsx
{open && <MessagePopup rounding="none" message="Apply these workspace settings?" onClose={() => setOpen(false)} onConfirm={() => setOpen(false)} onCancel={() => setOpen(false)} />}

medium rounding

medium-rounding.tsx
{open && <MessagePopup rounding="medium" message="Apply these workspace settings?" onClose={() => setOpen(false)} onConfirm={() => setOpen(false)} onCancel={() => setOpen(false)} />}

large rounding

large-rounding.tsx
{open && <MessagePopup rounding="large" message="Apply these workspace settings?" onClose={() => setOpen(false)} onConfirm={() => setOpen(false)} onCancel={() => setOpen(false)} />}

Props API

27 props
Columns
Message Pop Up props API
Default
Description
actionsClassNamestringNoprops—Additional class name applied to the actions element.
aria-describedbystringNoaria—ID of an element that describes the dialog.
aria-labelstringNoaria—Accessible label for the dialog.
aria-label-close-buttonstringNoaria"Close"Accessible label for the close button.
aria-labelledbystringNoaria—ID of an element that labels the dialog.
aria-live"off" | "polite" | "assertive"Noaria—aria-live value applied to the message element.
bodyClassNamestringNoprops—Additional class name applied to the body element.
cancelButtonClassNamestringNoprops—Additional class name applied to the cancel button.
cancelTextstringNoprops"Cancel"Text for the cancel button.
classNamestringNostyling—Additional class name applied to the wrapper element.
closeButtonClassNamestringNoprops—Additional class name applied to the close button.
confirmButtonClassNamestringNoprops—Additional class name applied to the confirm button.