For #27584 - Replace Button in RecentSyncedTab with SecondaryButton

pull/543/head
Gabriel Luong 2 years ago committed by mergify[bot]
parent 75460afc10
commit 9a4d4c1371

@ -102,19 +102,23 @@ fun PrimaryButton(
* Secondary button.
*
* @param text The button text to be displayed.
* @param textColor [Color] to apply to the button text.
* @param backgroundColor The background [Color] of the button.
* @param icon Optional [Painter] used to display an [Icon] before the button text.
* @param onClick Invoked when the user clicks on the button.
*/
@Composable
fun SecondaryButton(
text: String,
textColor: Color = FirefoxTheme.colors.textActionSecondary,
backgroundColor: Color = FirefoxTheme.colors.actionSecondary,
icon: Painter? = null,
onClick: () -> Unit,
) {
Button(
text = text,
textColor = FirefoxTheme.colors.textActionSecondary,
backgroundColor = FirefoxTheme.colors.actionSecondary,
textColor = textColor,
backgroundColor = backgroundColor,
icon = icon,
tint = FirefoxTheme.colors.iconActionSecondary,
onClick = onClick,

@ -48,7 +48,7 @@ import mozilla.components.support.ktx.kotlin.trimmed
import org.mozilla.fenix.R
import org.mozilla.fenix.compose.Image
import org.mozilla.fenix.compose.ThumbnailCard
import org.mozilla.fenix.compose.button.Button
import org.mozilla.fenix.compose.button.SecondaryButton
import org.mozilla.fenix.home.recentsyncedtabs.RecentSyncedTab
import org.mozilla.fenix.home.recenttabs.RecentTab
import org.mozilla.fenix.theme.FirefoxTheme
@ -179,7 +179,7 @@ fun RecentSyncedTab(
Spacer(modifier = Modifier.height(32.dp))
Button(
SecondaryButton(
text = if (tab != null) {
stringResource(R.string.recent_tabs_see_all_synced_tabs_button_text)
} else {
@ -187,7 +187,6 @@ fun RecentSyncedTab(
},
textColor = buttonTextColor,
backgroundColor = buttonBackgroundColor,
tint = FirefoxTheme.colors.iconActionSecondary,
onClick = onSeeAllSyncedTabsButtonClick,
)
}

Loading…
Cancel
Save