Remove lineHeight parameter. Must use style only.

This commit is contained in:
Benoit Marty 2023-07-10 17:10:41 +02:00 committed by Benoit Marty
parent 68f14141d6
commit 277595412f
4 changed files with 12 additions and 13 deletions

View file

@ -38,6 +38,7 @@ import io.element.android.libraries.designsystem.preview.ElementPreviewLight
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.RadioButton
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
@Composable
fun RoomPrivacyOption(
@ -76,8 +77,7 @@ fun RoomPrivacyOption(
Spacer(Modifier.size(3.dp))
Text(
text = roomPrivacyItem.description,
fontSize = 12.sp,
lineHeight = 17.sp,
style = ElementTheme.typography.fontBodySmRegular,
color = MaterialTheme.colorScheme.tertiary,
)
}

View file

@ -141,7 +141,10 @@ private fun ReactionContent(
) {
Text(
text = reaction.displayKey,
fontSize = 15.sp, lineHeight = reactionEmojiLineHeight
style = ElementTheme.typography.fontBodyMdRegular.copy(
fontSize = 15.sp,
lineHeight = reactionEmojiLineHeight,
),
)
if (reaction.count > 1) {
Spacer(modifier = Modifier.width(4.dp))
@ -175,9 +178,11 @@ internal fun MessagesReactionExtraButtonsPreview() = ElementPreview {
onClick = {}
)
MessagesReactionButton(
content = MessagesReactionsButtonContent.Reaction(aTimelineItemReactions().reactions.first().copy(
key = "A very long reaction with many characters that should be truncated"
)),
content = MessagesReactionsButtonContent.Reaction(
aTimelineItemReactions().reactions.first().copy(
key = "A very long reaction with many characters that should be truncated"
)
),
onClick = {}
)
}