From 83b7ee19e8ef9bf430fe5224633aaacf07d38fbc Mon Sep 17 00:00:00 2001 From: Maciej Procyk Date: Sun, 18 Feb 2024 22:30:12 +0100 Subject: [PATCH] add theme base --- .../src/commonMain/kotlin/in/procyk/shin/App.kt | 6 +++--- .../kotlin/in/procyk/shin/ui/theme/ShinTheme.kt | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 composeApp/src/commonMain/kotlin/in/procyk/shin/ui/theme/ShinTheme.kt diff --git a/composeApp/src/commonMain/kotlin/in/procyk/shin/App.kt b/composeApp/src/commonMain/kotlin/in/procyk/shin/App.kt index 43492d1..e0d56d4 100644 --- a/composeApp/src/commonMain/kotlin/in/procyk/shin/App.kt +++ b/composeApp/src/commonMain/kotlin/in/procyk/shin/App.kt @@ -1,18 +1,18 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.input.key.* +import `in`.procyk.shin.createHttpClient import `in`.procyk.shin.ui.ShortenRequest import `in`.procyk.shin.ui.ShortenResponse -import `in`.procyk.shin.createHttpClient +import `in`.procyk.shin.ui.theme.ShinTheme @Composable fun ShinApp() { val client = remember { createHttpClient() } - MaterialTheme { + ShinTheme { var shortenedUrl by remember> { mutableStateOf(null) } Column( modifier = Modifier diff --git a/composeApp/src/commonMain/kotlin/in/procyk/shin/ui/theme/ShinTheme.kt b/composeApp/src/commonMain/kotlin/in/procyk/shin/ui/theme/ShinTheme.kt new file mode 100644 index 0000000..7a9c448 --- /dev/null +++ b/composeApp/src/commonMain/kotlin/in/procyk/shin/ui/theme/ShinTheme.kt @@ -0,0 +1,16 @@ +package `in`.procyk.shin.ui.theme + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable + +@Composable +internal fun ShinTheme( + content: @Composable () -> Unit, +) { + MaterialTheme( + colorScheme = MaterialTheme.colorScheme, + shapes = MaterialTheme.shapes, + typography = MaterialTheme.typography, + content = content + ) +} \ No newline at end of file