git.iko.soy/opencode-android
on 8865a77 help sign in
23 lines 710 B history raw
1package soy.iko.opencode.ui.components
3import androidx.compose.material3.MaterialTheme
4import androidx.compose.runtime.Composable
5import androidx.compose.ui.Modifier
6import androidx.compose.ui.text.TextStyle
7import com.mikepenz.markdown.m3.Markdown
9/**
10 * Renders markdown using [multiplatform-markdown-renderer](https://github.com/mikepenz/multiplatform-markdown-renderer)
11 * (commonmark-java under the hood). Keeps a local API so callers don't import the library directly.
12 */
13@Composable
14fun MarkdownText(
15 markdown: String,
16 modifier: Modifier = Modifier,
17 style: TextStyle = MaterialTheme.typography.bodyLarge,
18) {
19 Markdown(
20 content = markdown,
21 modifier = modifier,
22 )