1.0.21 • Published 6 years ago
kara-module-file-list v1.0.21
Introduce
- react-modal-plugin just provide one div, this div is modal.
- In this div(modal) html is modal's child.
- react-modal-plugin provide some child(alert,comfirm,dialog).
- You can custom child , class name , style for modal.
Example and demo
- Place download react-modal-plugin open
demo/index.html
. Example and demo are one on one.
Doc
Alert
Alert is modal's child. Example see example/alert.js
. Demo open demo/alert.js
in browser.
import Modal,{Alert} from 'react-modal-plugin'
<Modal show={true}>
<Alert
onConfirm={()=>{alert('You click confirm button!')}}
title="title"
message="message"
confirmButton="confirm"
className="custom-class-name"
/>
</Modal>
Alert props:
- title value is text,it's alert title,if title value is undefined it's don't show in alert.
- message value is text,it's alert message,if message value is undefined it's don't show in alert.
- confirmButton value is text,it's default value is
confirm
.- clssName value is class name,you can custom alert style use className.
- onConfirm value is function,wen confirm button is click modal will call onConfirm function, so you can add you code in onConfirm, don't forget set modal props show value is false.
Confirm
Confirm is modal's child. Example see example/confirm.js
. Demo open demo/confirm.js
in browser.
import Modal,{Confirm} from 'react-modal-plugin'
<Modal show={true}>
<Confirm
onConfirm={()=>{alert('You click confirm button.')}}
onCancel={()=>{alert('You click cancel button.')}}
title="title"
message="message"
confirmButton="confirm"
cancelButton="cancel"
className="custom-class-name"
/>
</Modal>
Confirm props:
- title value is text,it's confirm title,if title value is undefined it's don't show in confirm.
- message value is text,it's confirm message,if message value is undefined it's don't show in confirm.
- confirmButton value is text,it's default value is
confirm
.- cancelButton value is text,it's default value is
cancel
.- clssName value is class name,you can custom confirm style use className.
- onConfirm value is function,wen confirm button is click modal will call onConfirm function, so you can add you code in onConfirm, don't forget set modal props show value is false.
- onCancel value is function,wen cancel button is click modal will call onCancel function, you can set modal show value is false in this function.
Dialog
Dialog is modal's child. Example see
example/dialog.js
. Demo opendemo/dialog.js
in browser.import Modal,{Dialog} from 'react-modal-plugin'
1.0.21
6 years ago
1.0.20
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.15
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago