fix(common-ui): markdown header size

This commit is contained in:
Diego Beraldin 2023-09-19 20:04:54 +02:00
parent 053084f01e
commit 3c3ee8da95
3 changed files with 16 additions and 8 deletions

View File

@ -84,7 +84,8 @@ fun PostCard(
)
Box {
PostCardBody(
modifier = Modifier.heightIn(max = 200.dp)
modifier = Modifier
.heightIn(max = 200.dp)
.padding(bottom = Spacing.xs),
text = post.text,
)

View File

@ -27,12 +27,12 @@ fun PostCardBody(
modifier = modifier,
content = text,
typography = markdownTypography(
h1 = MaterialTheme.typography.displayLarge,
h2 = MaterialTheme.typography.displayMedium,
h3 = MaterialTheme.typography.displaySmall,
h4 = MaterialTheme.typography.headlineMedium,
h5 = MaterialTheme.typography.headlineSmall,
h6 = MaterialTheme.typography.titleLarge,
h1 = MaterialTheme.typography.headlineLarge,
h2 = MaterialTheme.typography.headlineMedium,
h3 = MaterialTheme.typography.headlineSmall,
h4 = MaterialTheme.typography.titleLarge,
h5 = MaterialTheme.typography.titleMedium,
h6 = MaterialTheme.typography.titleSmall,
text = MaterialTheme.typography.bodyMedium,
paragraph = MaterialTheme.typography.bodyMedium,
),

View File

@ -26,7 +26,14 @@ fun PostCardTitle(
modifier = modifier,
content = text,
typography = markdownTypography(
text = MaterialTheme.typography.displaySmall,
h1 = MaterialTheme.typography.headlineLarge,
h2 = MaterialTheme.typography.headlineMedium,
h3 = MaterialTheme.typography.headlineSmall,
h4 = MaterialTheme.typography.titleLarge,
h5 = MaterialTheme.typography.titleMedium,
h6 = MaterialTheme.typography.titleSmall,
text = MaterialTheme.typography.bodyMedium,
paragraph = MaterialTheme.typography.bodyMedium,
),
colors = markdownColor(
text = MaterialTheme.colorScheme.onSurfaceVariant,