From 87a78a419d21fee7d5488934f6a7709a0554730b Mon Sep 17 00:00:00 2001 From: Hauke Sommerfeld Date: Tue, 4 Jun 2024 22:00:00 +0200 Subject: [PATCH] Upgrade to fritz2 1.0-RC18 --- gradle/libs.versions.toml | 2 +- web/src/jsMain/kotlin/de/haukesomm/sokoban/web/GameFrame.kt | 4 ++-- .../kotlin/de/haukesomm/sokoban/web/components/Modal.kt | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cb7791a..c82ca70 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin = "1.9.22" kotlinx-coroutines = "1.7.3" # kotlinx-serialization = "1.6.2" -fritz2 = "1.0-RC17" +fritz2 = "1.0-RC18" ksp = "1.9.22-1.0.16" npm-tailwindcss = "3.3.3" diff --git a/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/GameFrame.kt b/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/GameFrame.kt index 049517d..f70e93f 100644 --- a/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/GameFrame.kt +++ b/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/GameFrame.kt @@ -58,7 +58,7 @@ class GameFrame(context: RenderContext) : RenderContext by context { div( - classes( + joinClasses( "w-full py-2 px-4 grid grid-cols-1 lg:grid-cols-[2fr_1fr_2fr] gap-4 items-center", "text-sm bg-background-lightest dark:bg-background-dark shadow-sm dark:shadow-md" ) @@ -131,7 +131,7 @@ class GameFrame(context: RenderContext) : RenderContext by context { title("Settings") content { div( - classes( + joinClasses( "w-full md:w-auto max-w-none md:max-w-4xl p-4 rounded-md", "grid grid-cols-1 sm:grid-cols-2 gap-6" ) diff --git a/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/components/Modal.kt b/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/components/Modal.kt index c1f0af9..c92b548 100644 --- a/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/components/Modal.kt +++ b/web/src/jsMain/kotlin/de/haukesomm/sokoban/web/components/Modal.kt @@ -78,11 +78,13 @@ class Modal(context: RenderContext, payloads: Flow) : RenderContext by private fun RenderContext.actionButton(text: String, primary: Boolean = false) = button( - classes( + joinClasses( "p-1 flex flex-row items-center gap-2 rounded-md text-base font-semibold focus-visible:outline-none", + """text-primary-500 dark:text-primary-600 | focus-visible:bg-primary-100 focus-visible:dark:bg-primary-900 """.trimMargin().takeIf { primary }, + """text-neutral-dark-secondary dark:text-neutral-light-secondary | focus-visible:bg-background-light focus-visible:dark:bg-background-darkest """.trimMargin().takeIf { !primary }