From 4e5cb28c77f5e101fb25e2d86c881bb17287afe8 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sat, 28 Mar 2020 22:57:13 +0100 Subject: Improve blueprint helpers --- sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sw-ui-kt/src/main/kotlin/blueprintjsHelpers.kt') 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 = {} ): ReactElement = child(Button::class) { attrs { @@ -53,8 +53,14 @@ fun RBuilder.bpButton( } fun RBuilder.bpButtonGroup( + large: Boolean = false, + minimal: Boolean = false, block: RHandler = {} ): ReactElement = child(ButtonGroup::class) { + attrs { + this.large = large + this.minimal = minimal + } block() } -- cgit