Skip to content

Commit a1a3cdc

Browse files
totoapp compose 1.2.0-rc01 (#2387)
* compose 1.2.0-rc01 * apply eymar patch to fix js
1 parent 500cad0 commit a1a3cdc

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# TODO can we get rid of duplication with root gradle.properties?
2-
kotlin.version=1.6.10
3-
compose.version=1.1.0
2+
kotlin.version=1.7.10
3+
compose.version=1.2.0-rc01

examples/todoapp/gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ kotlin.code.style=official
2222
org.gradle.parallel=true
2323
org.gradle.caching=true
2424
kotlin.native.disableCompilerDaemon=true
25+
26+
#TODO also change version in buildSrc/gradle.properties
2527
kotlin.version=1.7.10
2628
compose.version=1.2.0-rc01

examples/todoapp/web/build.gradle.kts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
2+
import org.jetbrains.compose.compose
23

34
plugins {
45
kotlin("multiplatform")
@@ -17,7 +18,7 @@ kotlin {
1718
named("jsMain") {
1819
dependencies {
1920
implementation(compose.runtime)
20-
implementation(compose.web.widgets)
21+
implementation(compose.web.core)
2122
implementation(project(":common:utils"))
2223
implementation(project(":common:database"))
2324
implementation(project(":common:root"))
@@ -37,6 +38,6 @@ kotlin {
3738
afterEvaluate {
3839
rootProject.extensions.configure<NodeJsRootExtension> {
3940
versions.webpackDevServer.version = "4.0.0"
40-
versions.webpackCli.version = "4.9.0"
41+
versions.webpackCli.version = "4.10.0"
4142
}
4243
}

examples/todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt

-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import example.todo.common.database.DefaultTodoSharedDatabase
88
import example.todo.common.database.todoDatabaseDriver
99
import example.todo.common.root.integration.TodoRootComponent
1010
import kotlinx.browser.document
11-
import org.jetbrains.compose.web.css.Style
1211
import org.jetbrains.compose.web.renderComposable
13-
import org.jetbrains.compose.web.ui.Styles
1412
import org.w3c.dom.HTMLElement
1513

1614
fun main() {
@@ -28,8 +26,6 @@ fun main() {
2826
lifecycle.resume()
2927

3028
renderComposable(root = rootElement) {
31-
Style(Styles)
32-
3329
TodoRootUi(root)
3430
}
3531
}

examples/todoapp/web/src/jsMain/kotlin/example/todo/web/Components.kt

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package example.todo.web
22

33
import androidx.compose.runtime.Composable
4-
import org.jetbrains.compose.common.material.Text
5-
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
64
import org.jetbrains.compose.web.attributes.InputType
75
import org.jetbrains.compose.web.css.AlignItems
86
import org.jetbrains.compose.web.css.DisplayStyle
@@ -66,7 +64,6 @@ fun Card(attrs: AttrBuilderContext<*> = {}, content: @Composable () -> Unit) {
6664
}
6765
}
6866

69-
@OptIn(ExperimentalComposeWebWidgetsApi::class)
7067
@Composable
7168
fun MaterialTextArea(
7269
id: String,
@@ -95,7 +92,7 @@ fun MaterialTextArea(
9592
)
9693

9794
Label(forId = id) {
98-
Text(text = label)
95+
Text(value = label)
9996
}
10097
}
10198
}

0 commit comments

Comments
 (0)