summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-03-28 22:57:13 +0100
committerJoffrey Bion <joffrey.bion@booking.com>2020-03-28 22:57:13 +0100
commit4e5cb28c77f5e101fb25e2d86c881bb17287afe8 (patch)
tree3740470f926d201f6bdef81d9919f33763d1bb19
parentCleanup (diff)
downloadseven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.tar.gz
seven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.tar.bz2
seven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.zip
Improve blueprint helpers
-rw-r--r--sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt b/sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt
index 22489c86..928653c5 100644
--- a/sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt
+++ b/sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt
@@ -36,7 +36,7 @@ fun RBuilder.bpButton(
icon: IconName? = null,
rightIcon: IconName? = null,
intent: Intent = Intent.NONE,
- onClick: ((event: MouseEvent) -> Unit)?,
+ onClick: ((event: MouseEvent) -> Unit)? = {},
block: RHandler<IButtonProps> = {}
): ReactElement = child(Button::class) {
attrs {
@@ -53,8 +53,14 @@ fun RBuilder.bpButton(
}
fun RBuilder.bpButtonGroup(
+ large: Boolean = false,
+ minimal: Boolean = false,
block: RHandler<IButtonGroupProps> = {}
): ReactElement = child(ButtonGroup::class) {
+ attrs {
+ this.large = large
+ this.minimal = minimal
+ }
block()
}
bgstack15