@paprika/dialog-actions

The DialogActions component renders three buttons, Save (hasConfirm), Don't Save (hasDecline) and Cancel.

Usage no npm install needed!

<script type="module">
  import paprikaDialogActions from 'https://cdn.skypack.dev/@paprika/dialog-actions';
</script>

README

@paprika/dialog-actions

Description

The DialogActions component renders three buttons, Save (hasConfirm), Don't Save (hasDecline) and Cancel.

Installation

yarn add @paprika/dialog-actions

or with npm:

npm install @paprika/dialog-actions

Props

DialogActions

Prop Type required default Description
kindConfirm string false "primary" If the primary button is a destructive action.
isDisabled bool false false If the primary and secondary buttons are disabled.
labelCancel string false "" Text for cancel button.
labelConfirm string false "" Text for primary action button.
labelDecline string false "" Text for a secondary generic button.
onCancel func false () => {} Function to call when cancel button is clicked.
onConfirm func false () => {} Function to call when primary button is clicked.
onDecline func false () => {} Function to call when secondary button is clicked.

Usage

Please use <L10n /> component to wrap <DialogActions /> in your application.

Example:

import DialogActions from "@paprika/dialog-actions";

<DialogActions />;

Links