From c78775aa2aaf76f9fa1404ff32a10fb8227f380e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 25 Oct 2019 20:46:42 +0200 Subject: Style fixes --- .../src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'kvision-modules/kvision-bootstrap/src/main/kotlin/pl/treksoft/kvision/dropdown') 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 { - 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) } } -- cgit