@paprika/dialog-actions
v5.0.0
Published
The DialogActions component renders three buttons, Save (hasConfirm), Don't Save (hasDecline) and Cancel.
Downloads
1,696
Readme
@paprika/dialog-actions
Description
The DialogActions component renders three buttons, Save (hasConfirm), Don't Save (hasDecline) and Cancel.
Installation
yarn add @paprika/dialog-actionsor with npm:
npm install @paprika/dialog-actionsProps
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 />;