Skip to content

Commit

Permalink
Use secondary style buttons in the Confirm modal dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
rjaros committed Aug 6, 2024
1 parent 30e838b commit fe7fa71
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import io.kvision.utils.event
* @param animation determines if animations are used
* @param centered determines if modal dialog is vertically centered
* @param cancelVisible determines if Cancel button is visible
* @param yesTitle yes button text
* @param noTitle no button text
* @param cancelTitle cancel button text
* @param yesTitle "Yes" button text
* @param noTitle "No" button text
* @param cancelTitle "Cancel" button text
* @param noCallback a function called after closing window with No button
* @param yesCallback a function called after closing window with Yes button
*/
Expand Down Expand Up @@ -111,8 +111,8 @@ open class Confirm(
}

private val contentTag = Tag(TAG.DIV, text, rich, align)
private val cancelButton = Button(cancelTitle, "fas fa-times")
private val noButton = Button(noTitle, "fas fa-ban")
private val cancelButton = Button(cancelTitle, "fas fa-times", ButtonStyle.SECONDARY)
private val noButton = Button(noTitle, "fas fa-ban", ButtonStyle.SECONDARY)
private val yesButton = Button(yesTitle, "fas fa-check", ButtonStyle.PRIMARY)

init {
Expand Down Expand Up @@ -166,6 +166,9 @@ open class Confirm(
* @param animation determines if animations are used
* @param centered determines if modal dialog is vertically centered
* @param cancelVisible determines if Cancel button is visible
* @param yesTitle "Yes" button text
* @param noTitle "No" button text
* @param cancelTitle "Cancel" button text
* @param noCallback a function called after closing window with No button
* @param yesCallback a function called after closing window with Yes button
*/
Expand Down

0 comments on commit fe7fa71

Please sign in to comment.