summaryrefslogtreecommitdiff
path: root/sw-ui/src/main/kotlin/com/palantir/blueprintjs
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-11-29 15:39:42 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-11-29 15:39:42 +0100
commitf91f16a0f87cba54087887931adee1c3c48df707 (patch)
tree5d47ba4093b4cb7435227c91c7db54160107fb05 /sw-ui/src/main/kotlin/com/palantir/blueprintjs
parentAdd traces to startGame_3players test (diff)
downloadseven-wonders-f91f16a0f87cba54087887931adee1c3c48df707.tar.gz
seven-wonders-f91f16a0f87cba54087887931adee1c3c48df707.tar.bz2
seven-wonders-f91f16a0f87cba54087887931adee1c3c48df707.zip
Add support for Icon intent in bpDialog
Diffstat (limited to 'sw-ui/src/main/kotlin/com/palantir/blueprintjs')
-rw-r--r--sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt2
-rw-r--r--sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt7
2 files changed, 5 insertions, 4 deletions
diff --git a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt b/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt
index ed95b8ab..1db018dd 100644
--- a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt
+++ b/sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt
@@ -17,7 +17,7 @@ external interface IDialogProps : IOverlayableProps, IBackdropProps, IProps {
* dialog's header. Note that the header will only be rendered if `title` is
* provided.
*/
- var icon: IconName?
+ var icon: dynamic /* IconName? | ReactElement? */
/**
* Whether to show the close button in the dialog's header.
* Note that the header will only be rendered if `title` is provided.
diff --git a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt b/sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt
index 0bd126fd..347e2170 100644
--- a/sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt
+++ b/sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt
@@ -158,7 +158,7 @@ fun RBuilder.bpOverlay(
fun RBuilder.bpDialog(
isOpen: Boolean,
title: ReactElement? = null,
- icon: IconName? = null,
+ icon: ReactElement? = null,
autoFocus: Boolean = true,
enforceFocus: Boolean = true,
usePortal: Boolean = true,
@@ -195,8 +195,9 @@ fun RBuilder.bpDialog(
fun RBuilder.bpDialog(
isOpen: Boolean,
- title: String? = null,
+ title: String?,
icon: IconName? = null,
+ iconIntent: Intent = Intent.NONE,
autoFocus: Boolean = true,
enforceFocus: Boolean = true,
usePortal: Boolean = true,
@@ -210,7 +211,7 @@ fun RBuilder.bpDialog(
): ReactElement = bpDialog(
isOpen = isOpen,
title = title?.let { buildElement { +title } },
- icon = icon,
+ icon = icon?.let { buildElement { bpIcon(name = icon, intent = iconIntent) } },
autoFocus = autoFocus,
enforceFocus = enforceFocus,
usePortal = usePortal,
bgstack15