This repository was archived by the owner on Jun 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ Body text for the modal.
3535#### buttonText: React.PropTypes.string
3636Options text for the initial button. Is only used if children are not passed.
3737
38+ #### cancelText: React.PropTypes.string
39+ Text for the cancel button in the modal.
40+
3841#### confirmText: React.PropTypes.string
3942Text for the confirm button in the modal.
4043
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var Confirm = React.createClass({
55 propTypes : {
66 body : React . PropTypes . any . isRequired ,
77 buttonText : React . PropTypes . string ,
8+ cancelText : React . PropTypes . string ,
89 confirmText : React . PropTypes . string ,
910 onConfirm : React . PropTypes . func . isRequired ,
1011 title : React . PropTypes . string . isRequired ,
@@ -68,7 +69,7 @@ var Confirm = React.createClass({
6869 { this . props . body }
6970 </ Modal . Body >
7071 < Modal . Footer >
71- < Button bsStyle = "default" onClick = { this . onClose } > Cancel</ Button >
72+ < Button bsStyle = "default" onClick = { this . onClose } > { this . props . cancelText ? this . props . cancelText : ' Cancel' } </ Button >
7273 < Button bsStyle = "danger" onClick = { this . onConfim } > { this . props . confirmText ? this . props . confirmText : 'Confirm' } </ Button >
7374 </ Modal . Footer >
7475 </ Modal >
You can’t perform that action at this time.
0 commit comments