File tree Expand file tree Collapse file tree 7 files changed +31
-5
lines changed
compose-multiplatform-common/src
commonMain/kotlin/com/huanshankeji/compose
jsMain/kotlin/com/huanshankeji/compose
jvmMain/kotlin/com/huanshankeji/compose
compose-multiplatform-material/src
commonMain/kotlin/com/huanshankeji/compose/material
jsMain/kotlin/com/huanshankeji/compose/material
jvmMain/kotlin/com/huanshankeji/compose/material
demo/src/commonMain/kotlin/com/huanshankeji/compose/material/demo Expand file tree Collapse file tree 7 files changed +31
-5
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ package com.huanshankeji.compose
33import androidx.compose.runtime.Composable
44
55@Composable
6- expect fun Text (text : String )
6+ expect fun BasicText (text : String )
Original file line number Diff line number Diff line change 1+ package com.huanshankeji.compose
2+
3+ import androidx.compose.runtime.Composable
4+ import org.jetbrains.compose.web.dom.Text
5+
6+ @Composable
7+ actual fun BasicText (text : String ) =
8+ Text (text)
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ package com.huanshankeji.compose
33import androidx.compose.runtime.Composable
44
55@Composable
6- actual fun Text (text : String ) =
7- org.jetbrains. compose.web.dom. Text (text)
6+ actual fun BasicText (text : String ) =
7+ androidx. compose.foundation.text. BasicText (text)
Original file line number Diff line number Diff line change 1+ package com.huanshankeji.compose.material
2+
3+ import androidx.compose.runtime.Composable
4+
5+ @Composable
6+ expect fun Text (text : String )
Original file line number Diff line number Diff line change 1+ package com.huanshankeji.compose.material
2+
3+ import androidx.compose.runtime.Composable
4+ import com.huanshankeji.compose.BasicText
5+
6+ @Composable
7+ actual fun Text (text : String ) =
8+ BasicText (text)
Original file line number Diff line number Diff line change 1- package com.huanshankeji.compose
1+ package com.huanshankeji.compose.material
22
33import androidx.compose.runtime.Composable
44
Original file line number Diff line number Diff line change 11package com.huanshankeji.compose.material.demo
22
33import androidx.compose.runtime.*
4- import com.huanshankeji.compose.Text
4+ import com.huanshankeji.compose.BasicText
55import com.huanshankeji.compose.layout.Box
66import com.huanshankeji.compose.material.Button
77import com.huanshankeji.compose.material.Card
8+ import com.huanshankeji.compose.material.Text
89import com.huanshankeji.compose.material.TopAppBarScaffold
910import com.huanshankeji.compose.material.icon.MaterialIcons
1011import com.huanshankeji.compose.ui.unit.dpOrPx
@@ -24,6 +25,9 @@ fun App() {
2425 padding(16 .dpOrPx)
2526 }
2627 }) {
28+ BasicText (" basic text" )
29+ Text (" Material text" )
30+
2731 var count by remember { mutableStateOf(0 ) }
2832 Button ({ count++ }) {
2933 Label (count.toString())
You can’t perform that action at this time.
0 commit comments