You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-error-boundaries

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-error-boundaries

React HOC for error boundaries.

0.1.1
Source
npmnpm
Version published
Weekly downloads
140
44.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-popconfirm

version downloads MIT License

A popover confirm dialog for react, react-bootstrap and react-confirm are used with.

PopConfirm

Usage

// import first
import PopConfirm from 'react-popconfirm'


// call it!
/**
 * options: 
 *  {
 *    element,              // require
 *    confirmation,         // require
 *    placement = 'top',    // require
 *    okLabbel = 'Yes',     // optional (default 'Yes')
 *    cancelLabel = 'No',   // optional (default 'No')
 *    positionLeft,         // optional (auto calculate by element position and width,height)
 *    positionTop,          // optional (auto calculate by element position and width,height)
 *    width = 160,          // optional (default 160)
 *    height = 70           // optional (default 70)
 *    confirmationColor = '#e83f3f',  // optional (default '#e83f3f')
 *    okStyle = 'info',               // optional (default 'info', available: default|primary|success|info|warning|danger|link)
 *    cancelStyle = 'default'         // optional (default 'default', available: default|primary|success|info|warning|danger|link)
 *  }
 */
PopConfirm({
	confirmation:'Are you sure?',
	okLabbel: 'Yes',
	cancelLabel: 'No',
	placement:'top',
	element:target	// target is the element you clicked
  }).then(
  (result) => {
    // `proceed` callback
    console.log('proceed called');
  },
  (result) => {
    // `cancel` callback
    console.log('cancel called');
  }
)
// nothing will be called when `dismiss` is triggered.

Try example

# run example, auto open browser and enable hot loader
cd example
npm install
npm start

# build
npm run build

License

MIT

Keywords

react

FAQs

Package last updated on 21 Dec 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