Created
April 11, 2025 07:18
-
-
Save Suchiq/e0bfcbd8d9b4f6d5bb8c49a3e7d6f05c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Composable | |
| fun HorizontalBox(onTextOverflow: (Boolean) -> Unit) { | |
| Row { | |
| OverflowAwareButton(text = "Very long text that might overflow", onTextOverflow = onTextOverflow) | |
| OverflowAwareButton(text = "Another Button", onTextOverflow = onTextOverflow) | |
| } | |
| } | |
| @Composable | |
| fun VerticalBox() { | |
| Column { | |
| Button(onClick = {}) { | |
| Text( | |
| text = "Very long text that might overflow", | |
| maxLines = 1, | |
| overflow = TextOverflow.Ellipsis, | |
| ) | |
| } | |
| Button(onClick = {}) { | |
| Text( | |
| text = "Another Button", | |
| maxLines = 1, | |
| overflow = TextOverflow.Ellipsis, | |
| ) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment