From b84b76935d852e913947e102352de20d9aab57ef Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Wed, 25 Mar 2020 12:14:18 +0100 Subject: Rename Utils to ReactUtils to allow for other Utils --- .../org/luxons/sevenwonders/ui/utils/ReactUtils.kt | 16 ++++++++++++++++ .../kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/ReactUtils.kt delete mode 100644 sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt (limited to 'sw-ui-kt') diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/ReactUtils.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/ReactUtils.kt new file mode 100644 index 00000000..6aa7a438 --- /dev/null +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/ReactUtils.kt @@ -0,0 +1,16 @@ +package com.palantir.blueprintjs.org.luxons.sevenwonders.ui.utils + +import kotlinx.html.SPAN +import kotlinx.html.attributesMapOf +import react.RBuilder +import react.ReactElement +import react.dom.* + +/** + * Creates a ReactElement without appending it (so that is can be passed around). + */ +fun createElement(block: RBuilder.() -> ReactElement): ReactElement { + return RDOMBuilder { SPAN(attributesMapOf("class", null), it) } + .apply { block() } + .create() +} diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt deleted file mode 100644 index 6aa7a438..00000000 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/utils/Utils.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.palantir.blueprintjs.org.luxons.sevenwonders.ui.utils - -import kotlinx.html.SPAN -import kotlinx.html.attributesMapOf -import react.RBuilder -import react.ReactElement -import react.dom.* - -/** - * Creates a ReactElement without appending it (so that is can be passed around). - */ -fun createElement(block: RBuilder.() -> ReactElement): ReactElement { - return RDOMBuilder { SPAN(attributesMapOf("class", null), it) } - .apply { block() } - .create() -} -- cgit