Themes

Components/Functional Components/ActionDelete
ActionDelete

An action to delete, with confirmation.

Props

Name
Description
Type
deleteItem
() => Promise<void>
description

The name of the item to delete.

string
disabled

if the action should be disabled.

boolean
dropdownItem

If the action is within an es-action-dropdown.

boolean
icon

The icon to show for the action.

IconDescription
modal

The text to display within the modal.

ConfirmModalOptions
toast

The details of the toast to be popped, when successfully deleted.

ToastOptions
typeToConfirm

If the user needs to type the passed description to enable deletion.

boolean

IconDescription

IconDescription = string | NamespacedIcon

NamespacedIcon

NamespacedIcon = [namespace: string | symbol, name: string]

ConfirmModalOptions

What to display within a modal.

Name
Description
Type
body

Text or component to display in the body of the modal.

string | FunctionalComponent<unknown>
confirm

Text to display within the confirm button.

string
confirmVariant

Which variant to display the button as.

ButtonVariant
heading

Text to display in the heading.

string
preHeading

Text to display above the heading.

string
warning

Text to display in red below the body.

string

ButtonVariant

ButtonVariant = "default" | "filled" | "outline" | "delete" | "cancel" | "minimal" | "link"

ToastOptions

Name
Description
Type
duration

How long to display the notification for before removing it.

number
icon

Icon to display on left of the toast. Will default to default of level.

IconDescription
message

Message to be displayed under the title.

string
onClick
(e: MouseEvent ) => void
title

Title to be displayed on the toast.

string