From 86ac5d3b6a9b8544bb16a6325c2831be54a61e74 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Fri, 27 Oct 2023 18:22:58 +0530 Subject: [PATCH] Replace "add" text button with icon button in feed link input --- .../rss/reader/home/ui/FeedLinkInputField.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeedLinkInputField.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeedLinkInputField.kt index 58370b82d..8a1ad4d1c 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeedLinkInputField.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeedLinkInputField.kt @@ -23,14 +23,14 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.CheckCircle import androidx.compose.material.icons.rounded.ArrowBack -import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.IconButtonDefaults import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text -import androidx.compose.material3.TextButton import androidx.compose.material3.TextField import androidx.compose.material3.TextFieldDefaults import androidx.compose.runtime.Composable @@ -127,17 +127,16 @@ internal fun FeedLinkInputField( strokeWidth = 4.dp ) } else { - TextButton( - modifier = Modifier.padding(end = 8.dp), - enabled = !isInputBlank, + IconButton( onClick = { onAddFeed() }, + enabled = !isInputBlank, colors = - ButtonDefaults.textButtonColors( + IconButtonDefaults.iconButtonColors( contentColor = AppTheme.colorScheme.tintedForeground, disabledContentColor = AppTheme.colorScheme.tintedForeground.copy(alpha = 0.4f) - ) + ), ) { - Text(text = LocalStrings.current.buttonAdd, style = MaterialTheme.typography.labelLarge) + Icon(Icons.Outlined.CheckCircle, contentDescription = LocalStrings.current.buttonAdd) } } },