项目作者: ahoseinian

项目描述 :
Simple react component that handles confirmation onClick
高级语言: JavaScript
项目地址: git://github.com/ahoseinian/react-confirm-btn.git
创建时间: 2017-06-08T12:15:18Z
项目社区:https://github.com/ahoseinian/react-confirm-btn

开源协议:MIT License

下载


React Confirm Button

Simple react component that handles confirmation before running an action

Installation

  1. npm install react-confirm-btn --save
  2. // or
  3. yarn add react-confirm-btn

Example

  1. import ConfirmBtn from 'react-confirm-btn'
  2. ...
  3. <ConfirmBtn onConfirm="..." > Delete </ConfirmBtn>

Props

  1. {
  2. onConfirm: () => void,
  3. confirmText?: string,
  4. time?: number,
  5. style?: {},
  6. ...
  7. }

Demo

Check out the Demo generated using storybook