Sam
06/01/2021, 7:28 AMText
component? Will it be consistent with https://developer.android.com/jetpack/compose/text or will it require wrapping it with Span
as is at the moment?Oleksandr Karpovich [JB]
06/01/2021, 7:44 AMText
components:
• one which is a part of HTML composables (has no style parameters, only text: String)
• another one which is a part of widgets - https://github.com/JetBrains/compose-jb/blob/master/web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt
I guess you're asking about the first case?
If so, then I think the idea behind HTML composables is to keep them as close as possible to HTML tags. That means there is no plan to add style to the @Composable fun Text(text: String) {}. (and I agree, there is no tag for text but we have it as a component)
I agree that writing Span(...) { Text("some text") }
is less convenient than having a ready to use styleable Text component. But that styleable Text probably won't be a part of HTML composables library.Oleksandr Karpovich [JB]
06/01/2021, 7:48 AMSam
06/01/2021, 7:49 AMTextDefault.kt
before. Sure, this makes sense to me to style with Span
when working with DOM API.Akif Abasov [JB]
06/01/2021, 9:06 AMSpan
to style your text. Just to be sure which tag will be there if you have style or if you haven’t any style.