diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-28 22:57:13 +0100 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-03-28 22:57:13 +0100 |
commit | 4e5cb28c77f5e101fb25e2d86c881bb17287afe8 (patch) | |
tree | 3740470f926d201f6bdef81d9919f33763d1bb19 /sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt | |
parent | Cleanup (diff) | |
download | seven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.tar.gz seven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.tar.bz2 seven-wonders-4e5cb28c77f5e101fb25e2d86c881bb17287afe8.zip |
Improve blueprint helpers
Diffstat (limited to 'sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt')
-rw-r--r-- | sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt | 8 |
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() } |