aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown')
-rw-r--r--kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt10
1 files changed, 4 insertions, 6 deletions
diff --git a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
index 342a8e84..891cd226 100644
--- a/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
+++ b/kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt
@@ -377,12 +377,10 @@ internal class DropDownButton(
}
override fun getSnClass(): List<StringBoolPair> {
- return if (forNavbar) {
- listOf("nav-link" to true, "dropdown-toggle" to true)
- } else if (forDropDown) {
- super.getSnClass() + listOf("dropdown-item" to true, "dropdown-toggle" to true)
- } else {
- super.getSnClass() + ("dropdown-toggle" to true)
+ return when {
+ forNavbar -> listOf("nav-link" to true, "dropdown-toggle" to true)
+ forDropDown -> super.getSnClass() + listOf("dropdown-item" to true, "dropdown-toggle" to true)
+ else -> super.getSnClass() + ("dropdown-toggle" to true)
}
}