Skip to content

Commit a463df6

Browse files
committed
chore: set max lines
1 parent 8ff0ea3 commit a463df6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/src/main/java/to/bitkit/ui/components/Text.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ fun Title(
8787
text: String,
8888
modifier: Modifier = Modifier,
8989
color: Color = MaterialTheme.colorScheme.primary,
90+
maxLines: Int = Int.MAX_VALUE,
91+
overflow: TextOverflow = TextOverflow.Ellipsis,
9092
textAlign: TextAlign = TextAlign.Unspecified,
9193
) {
9294
Text(
9395
text = text,
96+
maxLines = maxLines,
97+
overflow = overflow,
9498
style = AppTextStyles.Title.merge(
9599
color = color,
96100
textAlign = textAlign,

app/src/main/java/to/bitkit/ui/scaffold/AppTopBar.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fun AppTopBar(
5858
.size(32.dp)
5959
)
6060
}
61-
Title(text = titleText)
61+
Title(text = titleText, maxLines = 1)
6262
}
6363
}
6464
},

0 commit comments

Comments
 (0)