aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/table/Cell.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-07 09:58:14 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-07 09:58:14 +0200
commit04ac8542c218b7ce5199350f0880e8f7cb4252b6 (patch)
tree4f96d1c3bb8281289b96e2b11eecc404a3c98788 /src/main/kotlin/pl/treksoft/kvision/table/Cell.kt
parent6678eec9799681b09e5ac85de1a39596d56de22f (diff)
parent6b14906f0e35dc522bd1c1a44682d728315cf619 (diff)
downloadkvision-04ac8542c218b7ce5199350f0880e8f7cb4252b6.tar.gz
kvision-04ac8542c218b7ce5199350f0880e8f7cb4252b6.tar.bz2
kvision-04ac8542c218b7ce5199350f0880e8f7cb4252b6.zip
Merge branch 'bs4'
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/table/Cell.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/table/Cell.kt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/table/Cell.kt b/src/main/kotlin/pl/treksoft/kvision/table/Cell.kt
index 0a79c9f9..44646897 100644
--- a/src/main/kotlin/pl/treksoft/kvision/table/Cell.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/table/Cell.kt
@@ -64,6 +64,22 @@ open class Cell(
this.add(cell)
return cell
}
+
+ /**
+ * DSL builder extension function.
+ *
+ * It takes the same parameters as the constructor of the built component.
+ */
+ fun Row.thcell(
+ content: String? = null,
+ rich: Boolean = false,
+ align: Align? = null,
+ classes: Set<String> = setOf(), init: (HeaderCell.() -> Unit)? = null
+ ): HeaderCell {
+ val headerCell = HeaderCell(content, rich, align, Scope.ROW, classes, init)
+ this.add(headerCell)
+ return headerCell
+ }
}
}