fixes build of web
This commit is contained in:
@@ -4,12 +4,15 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
alias(libs.plugins.compose)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
|
||||
wasmJs {
|
||||
browser()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -17,13 +17,14 @@ kotlin {
|
||||
commonMain.dependencies {
|
||||
implementation(project(":shared"))
|
||||
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material3)
|
||||
implementation(compose.ui)
|
||||
implementation("org.jetbrains.compose.runtime:runtime:1.11.1")
|
||||
implementation("org.jetbrains.compose.foundation:foundation:1.11.1")
|
||||
implementation("org.jetbrains.compose.material3:material3:1.9.0")
|
||||
implementation("org.jetbrains.compose.ui:ui:1.11.1")
|
||||
}
|
||||
|
||||
wasmJsMain.dependencies {
|
||||
implementation(project(":shared_ui"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package dev.geekback.dopewars.web
|
||||
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.ComposeViewport
|
||||
import dev.geekback.dopewars.shared.Location
|
||||
import dev.geekback.dopewars.shared.api.MarketRequest
|
||||
import dev.geekback.dopewars.ui.api.MarketRequestUi
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class)
|
||||
fun main() {
|
||||
@@ -18,7 +19,20 @@ fun main() {
|
||||
|
||||
@Composable
|
||||
fun App() {
|
||||
val mr = MarketRequest(location = Location("Bronx"))
|
||||
|
||||
MaterialTheme {
|
||||
Text(modifier = Modifier.padding(16.dp), text = "Taxation is theft")
|
||||
MarketRequestUi().form(mr) {
|
||||
println("Updated $it")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun form(model: MarketRequest) {
|
||||
Card {
|
||||
Column {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user