diff options
Diffstat (limited to 'sw-ui/src/main/kotlin/com')
-rw-r--r-- | sw-ui/src/main/kotlin/com/palantir/blueprintjs/BpDialog.kt | 2 | ||||
-rw-r--r-- | sw-ui/src/main/kotlin/com/palantir/blueprintjs/blueprintjsHelpers.kt | 7 |
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, |