mirror of
https://github.com/jlengrand/compose-multiplatform.git
synced 2026-03-10 08:11:20 +00:00
Fix web-landing sample
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.5.21"
|
||||
id("org.jetbrains.compose") version "1.0.0-alpha1"
|
||||
kotlin("multiplatform") version "1.5.31"
|
||||
id("org.jetbrains.compose") version "0.0.0-master-build413"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -32,5 +32,6 @@ kotlin {
|
||||
afterEvaluate {
|
||||
rootProject.extensions.configure<NodeJsRootExtension> {
|
||||
versions.webpackDevServer.version = "4.0.0"
|
||||
versions.webpackCli.version = "4.9.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import org.jetbrains.compose.web.renderComposable
|
||||
import com.sample.components.*
|
||||
import com.sample.content.*
|
||||
import com.sample.style.AppStylesheet
|
||||
import org.w3c.dom.HTMLElement
|
||||
|
||||
|
||||
fun main() {
|
||||
renderComposable(rootElementId = "root") {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.sample.content
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import org.jetbrains.compose.web.attributes.InputType
|
||||
import org.jetbrains.compose.web.attributes.checked
|
||||
import org.jetbrains.compose.web.attributes.name
|
||||
import org.jetbrains.compose.web.css.*
|
||||
import org.jetbrains.compose.web.css.selectors.CSSSelector
|
||||
@@ -13,7 +12,6 @@ import org.jetbrains.compose.web.dom.Input
|
||||
import org.jetbrains.compose.web.dom.Label
|
||||
import org.jetbrains.compose.web.dom.Text
|
||||
import com.sample.style.AppStylesheet
|
||||
import org.jetbrains.compose.web.attributes.value
|
||||
|
||||
private object SwitcherVariables {
|
||||
val labelWidth by variable<CSSpxValue>()
|
||||
@@ -81,7 +79,7 @@ fun CodeSampleSwitcher(count: Int, current: Int, onSelect: (Int) -> Unit) {
|
||||
name("code-snippet")
|
||||
value("snippet$ix")
|
||||
id("snippet$ix")
|
||||
if (current == ix) checked()
|
||||
if (current == ix) checked(true)
|
||||
onChange { onSelect(ix) }
|
||||
})
|
||||
Label(forId = "snippet$ix") { Text("${ix + 1}") }
|
||||
|
||||
Reference in New Issue
Block a user