From 8497739c1092351b28ae82d769b1d06a9a30fd35 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 24 Mar 2022 17:23:52 +0600 Subject: [PATCH] add support of UIKitInverse and UIKitOverlay --- CHANGELOG.md | 3 +++ .../dev/inmo/jsuikit/modifiers/UIKitInverse.kt | 8 ++++++++ .../dev/inmo/jsuikit/modifiers/UIKitOverlay.kt | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitInverse.kt create mode 100644 src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitOverlay.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index eb3dcf6..44505a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 0.0.46 +* Add support of `UIKitOverlay` +* Add support of `UIKitInverse` + ## 0.0.45 * Add support of containers in `UIKitContainer` modifiers and `Container` function diff --git a/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitInverse.kt b/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitInverse.kt new file mode 100644 index 0000000..ff533e8 --- /dev/null +++ b/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitInverse.kt @@ -0,0 +1,8 @@ +package dev.inmo.jsuikit.modifiers + +sealed class UIKitInverse(classname: String) : UIKitModifier { + override val classes: Array = arrayOf(classname) + + object Light : UIKitInverse("uk-light") + object Dark : UIKitInverse("uk-dark") +} diff --git a/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitOverlay.kt b/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitOverlay.kt new file mode 100644 index 0000000..726a507 --- /dev/null +++ b/src/jsMain/kotlin/dev/inmo/jsuikit/modifiers/UIKitOverlay.kt @@ -0,0 +1,16 @@ +package dev.inmo.jsuikit.modifiers + +sealed class UIKitOverlay( + override val classes: Array = emptyArray(), + override val otherAttrs: Map = emptyMap() +) : UIKitModifier { + + object Default : UIKitOverlay(arrayOf("uk-overlay-default")) + object Primary : UIKitOverlay(arrayOf("uk-overlay-primary")) + object Icon : UIKitOverlay(arrayOf("uk-overlay-icon")) + + companion object : UIKitOverlay( + arrayOf("uk-overlay") + ) + +}