aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Root.kt4
-rw-r--r--src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Root.kt b/src/main/kotlin/pl/treksoft/kvision/core/Root.kt
index 21bdca04..82030249 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Root.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Root.kt
@@ -4,7 +4,7 @@ import com.github.snabbdom.VNode
import pl.treksoft.kvision.modal.Modal
import pl.treksoft.kvision.snabbdom.StringBoolPair
-class Root(id: String, private val fluid: Boolean = true) : Container() {
+class Root(id: String, private val fixed: Boolean = false) : Container() {
private val modals: MutableList<Modal> = mutableListOf()
private var rootVnode: VNode = render()
@@ -29,7 +29,7 @@ class Root(id: String, private val fluid: Boolean = true) : Container() {
}
override fun getSnClass(): List<StringBoolPair> {
- val css = if (fluid) "container-fluid" else "container"
+ val css = if (!fixed) "container-fluid" else "container"
return super.getSnClass() + (css to true)
}
diff --git a/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt b/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt
index bb6ed603..d8739a8b 100644
--- a/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt
+++ b/src/test/kotlin/test/pl/treksoft/kvision/core/RootSpec.kt
@@ -13,16 +13,16 @@ class RootSpec : DomSpec {
run {
Root("test")
val rootElem = document.getElementById("test")
- assertTrue("Standard root container has correct css class") { rootElem?.className == "container" }
+ assertTrue("Standard root container has correct css class") { rootElem?.className == "container-fluid" }
}
}
@Test
fun getSnClass_Fluid() {
run {
- Root("test", fluid = true)
+ Root("test", fixed = true)
val rootElem = document.getElementById("test")
- assertTrue("Fluid root container has correct css class") { rootElem?.className == "container-fluid" }
+ assertTrue("Fluid root container has correct css class") { rootElem?.className == "container" }
}
}