New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-confirm-button

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-confirm-button

React Confirm Button Component

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
85
decreased by-17.48%
Maintainers
1
Weekly downloads
 
Created
Source

react-confirm-button

Install

npm install --save react-confirm-button

You may install bootstrap or material-ui or any other styling, as desired.

Usage

import ConfirmButton from 'react-confirm-button';

...

  <div>

    <p>Basic Confirmation Button</p>
    <ConfirmButton
      onConfirm={() => console.log('I have Confirmed')}
      text="Do Stuff"
      confirming={{
        text: "Are you sure?"
      }}
    />

    <p>Fully Customized Button</p>
    <ConfirmButton
      disableAfterConfirmed
      onConfirm={ action('confirmed') }
      text="Button is Active"
      className="btn btn-primary btn-lg"
      style={{ borderColor: 'yellow' }}
      confirming={{
        text: 'Button is Confirming',
        className: 'btn btn-info btn-sm',
        style: { borderColor: 'green' },
      }}
      disabled={{
        text: 'Button is Disabled',
        className: 'btn btn-secondary text-muted',
        style: { borderColor: 'red' },
      }}
    />
  </div>

See more examples and demos on storybook @ zeroasterisk.github.io and the source code for those examples in the stories

Dependancies

  • React

Roadmap

  • support children content as confirm text?
  • support disabled state
  • make CSS framework agnostic
  • make redux version?

Acknowledgements

Coded during a JSLou Meetup

Awesome Tools Used:

FAQs

Package last updated on 28 Sep 2017

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