react-simplert
v0.0.2
Published
ReactJS Simple Alert Component (SweetAlert Inspired)
Downloads
92
Maintainers
Readme
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 :