chore(common): prettify HTMLText preview

This commit is contained in:
Harsh Shandilya 2023-06-15 17:35:40 +05:30
parent ea7f7b6306
commit e0c9c88ca9
No known key found for this signature in database

View file

@ -18,7 +18,9 @@ import android.text.style.SubscriptSpan
import android.text.style.SuperscriptSpan import android.text.style.SuperscriptSpan
import android.text.style.URLSpan import android.text.style.URLSpan
import android.text.style.UnderlineSpan import android.text.style.UnderlineSpan
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.layout.Box
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
@ -42,6 +44,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.TextUnit
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.core.text.HtmlCompat import androidx.core.text.HtmlCompat
import dev.msfjarvis.claw.common.theme.LobstersTheme
private const val URL_TAG = "url_tag" private const val URL_TAG = "url_tag"
@ -197,6 +200,8 @@ private fun ClickableText(
@Preview @Preview
@Composable @Composable
fun HTMLTextPreview() { fun HTMLTextPreview() {
LobstersTheme {
Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) {
HTMLText( HTMLText(
text = text =
""" """
@ -210,4 +215,6 @@ fun HTMLTextPreview() {
""" """
.trimIndent() .trimIndent()
) )
}
}
} }