Skip to content

Commit

Permalink
feat(UI): Improve copy button placement in Studio Bot chat bubble
Browse files Browse the repository at this point in the history
This commit improves the placement of the copy button within the Studio Bot chat bubble.
  • Loading branch information
Mihai-Cristian Condrea committed Dec 1, 2024
1 parent 90d7c7b commit f82ef57
Showing 1 changed file with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,23 @@ fun MessageBubble(text : String , isBot : Boolean , showTypingAnimation : Boolea
text = textToDisplay , modifier = Modifier.padding(16.dp)
)
Row(
modifier = Modifier.fillMaxWidth() , horizontalArrangement = Arrangement.End
modifier = Modifier
.fillMaxWidth()
.padding(end = 8.dp) ,
horizontalArrangement = Arrangement.End
) {
TextButton(
modifier = Modifier.bounceClick() , onClick = {
ClipboardUtil.copyTextToClipboard(context = context ,
label = "Message" ,
text = text ,
onShowSnackbar = {
Toast.makeText(
context ,
"Message copied to clipboard" ,
Toast.LENGTH_SHORT
).show()
})
} , contentPadding = PaddingValues(horizontal = 8.dp)
) {
TextButton(modifier = Modifier.bounceClick() , onClick = {
ClipboardUtil.copyTextToClipboard(context = context ,
label = "Message" ,
text = text ,
onShowSnackbar = {
Toast.makeText(
context ,
"Message copied to clipboard" ,
Toast.LENGTH_SHORT
).show()
})
} , contentPadding = PaddingValues(horizontal = 8.dp)) {
Icon(
imageVector = Icons.Outlined.CopyAll ,
contentDescription = "Copy Message" ,
Expand Down

0 comments on commit f82ef57

Please sign in to comment.