1.1.5 • Published 29 days ago

@synerise/ds-confirmation v1.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
29 days ago

id: confirmation

title: Confirmation

Confirmation UI Component

Installation

npm i @synerise/ds-confirmation
or
yarn add @synerise/ds-confirmation

Usage

import Confirmation from '@synerise/ds-confirmation'

<Confirmation />

Demo

API

PropertyDescriptionTypeDefault
iconicon to display above titlePreferably Xl size icon from ds-icons ReactNode-
titleconfirmation titleReactNode-
descriptionconfirmation detailsReactNode-
textscustom translationsReactNode-
typeaction type - this defines the button (and icon if negative) colorsuccess / warning / negative / informative-
mainButtonPropsadditional button customisation propssubset of ButtonProps see ds-button-
secondaryButtonPropsadditional button customisation propssubset of ButtonProps see ds-button-
relatedObjectsdisplay objects that have relations to the object, renders a button in the footer that will switch confirmation modal content to this ReactNodeReactNode-
batchActionItemsrenders a list of items that are affectedListItemProps[]-
decisionOptionsrenders a group of radio buttons to choose fromRadioProps[]-
additionalInfoextra description to render within a bordered frameReactNode-

Prompt

PropertyDescriptionTypeDefault
titleprompt titleReactNode-
contentprompt contentReactNode-
textscustom translationsReactNode-
typeaction type - this defines the button colorsuccess / warning / negative / informative-
mainButtonPropsadditional button customisation propssubset of ButtonProps see ds-button-
secondaryButtonPropsadditional button customisation propssubset of ButtonProps see ds-button-

ConfirmationTexts

PropertyDescriptionTypeDefault
mainButtonLabelReactNodeOk
secondaryButtonLabelReactNodeCancel
relatedObjectsButtonLabelReactNodeShow related objects
relatedObjectsTitleReactNodeObjects to delete
batchActionItemsTitleReactNodeWhat do you want to do?
decisionTitleReactNodeRelated objects