Add Push chevron to Block autofill button (#6102)

This commit is contained in:
David Perez 2025-10-31 12:37:04 -05:00 committed by GitHub
parent d86443c6dd
commit bc74337eae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 10 deletions

View File

@ -53,6 +53,7 @@ import com.bitwarden.ui.platform.components.header.BitwardenListHeaderText
import com.bitwarden.ui.platform.components.model.CardStyle
import com.bitwarden.ui.platform.components.model.TooltipData
import com.bitwarden.ui.platform.components.row.BitwardenExternalLinkRow
import com.bitwarden.ui.platform.components.row.BitwardenPushRow
import com.bitwarden.ui.platform.components.row.BitwardenTextRow
import com.bitwarden.ui.platform.components.scaffold.BitwardenScaffold
import com.bitwarden.ui.platform.components.toggle.BitwardenSwitch
@ -327,11 +328,11 @@ private fun AutoFillScreenContent(
.fillMaxWidth(),
)
Spacer(modifier = Modifier.height(8.dp))
BitwardenTextRow(
BitwardenPushRow(
text = stringResource(id = BitwardenString.block_auto_fill),
description = BitwardenString
.auto_fill_will_not_be_offered_for_these_ur_is
.toAnnotatedString(),
description = stringResource(
id = BitwardenString.auto_fill_will_not_be_offered_for_these_ur_is,
),
onClick = autoFillHandlers.onBlockAutoFillClick,
cardStyle = CardStyle.Full,
modifier = Modifier

View File

@ -32,6 +32,7 @@ import com.bitwarden.ui.platform.theme.BitwardenTheme
* @param onClick The callback when the row is clicked.
* @param cardStyle The [CardStyle] to be applied to this row.
* @param modifier The modifier for this composable.
* @param description The optional displayable description text.
* @param leadingIcon An optional leading icon.
* @param notificationCount The optional notification count to be displayed.
*/
@ -41,6 +42,7 @@ fun BitwardenPushRow(
onClick: () -> Unit,
cardStyle: CardStyle,
modifier: Modifier = Modifier,
description: String? = null,
leadingIcon: IconData? = null,
notificationCount: Int = 0,
) {
@ -73,12 +75,22 @@ fun BitwardenPushRow(
)
Spacer(modifier = Modifier.width(width = 12.dp))
}
Text(
text = text,
style = BitwardenTheme.typography.bodyLarge,
color = BitwardenTheme.colorScheme.text.primary,
modifier = Modifier.fillMaxWidth(),
)
Column {
Text(
text = text,
style = BitwardenTheme.typography.bodyLarge,
color = BitwardenTheme.colorScheme.text.primary,
modifier = Modifier.fillMaxWidth(),
)
description?.let {
Text(
text = it,
style = BitwardenTheme.typography.bodyMedium,
color = BitwardenTheme.colorScheme.text.secondary,
modifier = Modifier.fillMaxWidth(),
)
}
}
}
TrailingContent(notificationCount = notificationCount)
}