react-simplert

0.0.2 • Public • Published

react-simplert

License Github Issue GitHub Fork GitHub Star

version downloads monthly downloads

react-simplert

ReactJS Simple Alert Component (SweetAlert Inspired)

Demo

https://mazipan.github.io/react-simplert/

Download

npm install react-simplert
OR
yarn add react-simplert

How to Use

Import to your component :

import Simplert from 'react-simplert'

Create some template in render() :

<Simplert 
    showSimplert={ this.state.showAlert }
    type={ this.state.typeAlert }
    title={ this.state.titleAlert }
    message={ this.state.messageAlert }
/>

Just set the props with your custom state.

Available Props

{
  showSimplert: PropTypes.bool.isRequired,
  title: PropTypes.string,
  message: PropTypes.any,        
  type: PropTypes.string,
  customClass: PropTypes.string,
  customIconUrl: PropTypes.string,
  onOpen: PropTypes.func,
  customCloseBtnText: PropTypes.string,
  customCloseBtnClass: PropTypes.string,
  onClose: PropTypes.func,
  useConfirmBtn: PropTypes.bool,
  customConfirmBtnText: PropTypes.string,
  customConfirmBtnClass: PropTypes.string,
  onConfirm: PropTypes.func,
  disableOverlayClick: PropTypes.bool,
  hideAllButton: PropTypes.bool
}

Hope will usefull for you all.

Contact Me :

Email Website Facebook

Twitter Linkedin Slideshare

Package Sidebar

Install

npm i react-simplert

Weekly Downloads

14

Version

0.0.2

License

MIT

Last publish

Collaborators

  • irfan.maulana