@ -4,7 +4,7 @@
< div class = "modal-content" >
< div class = "modal-header" >
< h5 id = "exampleModalLabel" class = "modal-title" >
{ { $t( "Confirm" ) } }
{ { title || $t( "Confirm" ) } }
< / h5 >
< button type = "button" class = "btn-close" data -bs -dismiss = " modal " aria -label = " Close " / >
< / div >
@ -15,7 +15,7 @@
< button type = "button" class = "btn" :class ="btnStyle" data -bs -dismiss = " modal " @click ="yes" >
{ { yesText } }
< / button >
< button type = "button" class = "btn btn-secondary" data -bs -dismiss = " modal " >
< button type = "button" class = "btn btn-secondary" data -bs -dismiss = " modal " @click ="no" >
{ { noText } }
< / button >
< / div >
@ -44,8 +44,13 @@ export default {
type : String ,
default : "No" ,
} ,
/** Title to show on modal. Defaults to translated version of "Config" */
title : {
type : String ,
default : null ,
}
} ,
emits : [ "yes" ] ,
emits : [ "yes" , "no" ] ,
data : ( ) => ( {
modal : null ,
} ) ,
@ -63,6 +68,12 @@ export default {
yes ( ) {
this . $emit ( "yes" ) ;
} ,
/ * *
* @ emits string "no" Notify the parent when No is pressed
* /
no ( ) {
this . $emit ( "no" ) ;
}
} ,
} ;
< / script >