mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 02:57:04 +05:30
fix(deps): update richtext to v1.0.0-alpha02
This commit is contained in:
parent
f0472b3d0c
commit
5a7e178c6d
2 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@ import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.text.SpanStyle
|
import androidx.compose.ui.text.SpanStyle
|
||||||
|
import androidx.compose.ui.text.TextLinkStyles
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextDecoration
|
import androidx.compose.ui.text.style.TextDecoration
|
||||||
import com.halilibo.richtext.commonmark.Markdown
|
import com.halilibo.richtext.commonmark.Markdown
|
||||||
|
@ -24,14 +25,14 @@ import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
internal fun ThemedRichText(text: String, modifier: Modifier = Modifier) {
|
internal fun ThemedRichText(text: String, modifier: Modifier = Modifier) {
|
||||||
val linkStyle =
|
val linkSpanStyle =
|
||||||
SpanStyle(
|
SpanStyle(
|
||||||
background = MaterialTheme.colorScheme.surfaceVariant,
|
background = MaterialTheme.colorScheme.surfaceVariant,
|
||||||
color = MaterialTheme.colorScheme.onSurface,
|
color = MaterialTheme.colorScheme.onSurface,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
textDecoration = TextDecoration.Underline,
|
textDecoration = TextDecoration.Underline,
|
||||||
)
|
)
|
||||||
val stringStyle = RichTextStringStyle.Default.copy(linkStyle = linkStyle)
|
val stringStyle = RichTextStringStyle(linkStyle = TextLinkStyles(linkSpanStyle))
|
||||||
CompositionLocalProvider(
|
CompositionLocalProvider(
|
||||||
LocalTextStyle provides MaterialTheme.typography.bodyLarge,
|
LocalTextStyle provides MaterialTheme.typography.bodyLarge,
|
||||||
LocalContentColor provides MaterialTheme.colorScheme.onBackground,
|
LocalContentColor provides MaterialTheme.colorScheme.onBackground,
|
||||||
|
|
|
@ -17,7 +17,7 @@ leakcanary = "3.0-alpha-8"
|
||||||
lifecycle = "2.9.0-alpha07"
|
lifecycle = "2.9.0-alpha07"
|
||||||
navigation = "2.9.0-alpha03"
|
navigation = "2.9.0-alpha03"
|
||||||
retrofit = "2.11.0"
|
retrofit = "2.11.0"
|
||||||
richtext = "1.0.0-alpha01"
|
richtext = "1.0.0-alpha02"
|
||||||
sentry-sdk = "7.18.1"
|
sentry-sdk = "7.18.1"
|
||||||
serialization = "1.7.3"
|
serialization = "1.7.3"
|
||||||
sqldelight = "2.0.2"
|
sqldelight = "2.0.2"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue