diff options
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/html/Bold.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Bold.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Bold.kt b/src/main/kotlin/pl/treksoft/kvision/html/Bold.kt index 10e8e82f..e21b4f85 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Bold.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Bold.kt @@ -22,6 +22,7 @@ package pl.treksoft.kvision.html import pl.treksoft.kvision.core.Container +import pl.treksoft.kvision.utils.set /** * Simple component rendered as *b*. @@ -57,10 +58,11 @@ fun Container.bold( content: String? = null, rich: Boolean = false, align: Align? = null, - classes: Set<String> = setOf(), + classes: Set<String>? = null, + className: String? = null, init: (Bold.() -> Unit)? = null ): Bold { - val bold = Bold(content, rich, align, classes).apply { init?.invoke(this) } + val bold = Bold(content, rich, align, classes ?: className.set).apply { init?.invoke(this) } this.add(bold) return bold } |