Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paprika/confirmation

Package Overview
Dependencies
Maintainers
3
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paprika/confirmation

Confirmation component allows user to confirm or cancel action

  • 3.0.0-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8K
decreased by-6.61%
Maintainers
3
Weekly downloads
 
Created
Source

@paprika/confirmation

Description

Confirmation component allows user to confirm or cancel action

Installation

yarn add @paprika/confirmation

or with npm:

npm install @paprika/confirmation

Props

Confirmation

PropTyperequireddefaultDescription
bodynodefalsenullContent of the popover confirmation
buttonSize[ Confirmation.types.size.SMALL, Confirmation.types.size.MEDIUM, Confirmation.types.size.LARGE]falseConfirmation.types.size.MEDIUMSize of the button
childrennodefalsenull
confirmButtonType[ Confirmation.types.kind.PRIMARY, Confirmation.types.kind.DESTRUCTIVE]falseConfirmation.types.kind.DESTRUCTIVEDetermine the styling of the confirm button
confirmLabelstringtrue-Label for the confirm button
customCancelLabelstringfalsenullCustom label for the cancel button
defaultIsOpenboolfalsefalseIf the popover is open by default
headingstringfalsenullHeading for the popover confirmation
isPendingboolfalsefalseIf the confirm button should render in a pending state (with a spinner icon)
onClosefuncfalse() => {}Callback when cancel button is clicked
onConfirmfunctrue-Callback when confirm button is clicked

Usage

import Confirmation from "@paprika/confirmation";

<Confirmation
  confirmLabel="Delete filter"
  body="Lorem ipsum dolor amet vexillologist tacos selvage narwhal butcher twee ethical hot chicken"
  onConfirm={handleCloseConfirm => handleConfirm(handleCloseConfirm)}
  onClose={handleClose}
  heading="Delete filter?">
    <Confirmation.TriggerButton>Trigger</Confirmation.TriggerButton>
  </Confirmation>
;

or

<Confirmation
  confirmLabel="Delete filter"
  body="Lorem ipsum dolor amet vexillologist tacos selvage narwhal butcher twee ethical hot chicken"
  defaultIsOpen
  onConfirm={handleCloseConfirm => handleConfirm(handleCloseConfirm)}
  heading="Delete filter?"
/>;

Components

You can use the following components to compose the Confirmation:

<Confirmation.TriggerButton>

  • Storybook Showcase
  • GitHub source code
  • Create GitHub issue
  • CHANGELOG

FAQs

Package last updated on 14 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc