mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 11:47:04 +05:30
chore: add labels to Crossfade
elements
This commit is contained in:
parent
b969b5f0bf
commit
55cc397333
2 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ fun ClawNavigationBar(
|
||||||
val isCurrentDestination = navController.currentDestination?.route == navItem.route
|
val isCurrentDestination = navController.currentDestination?.route == navItem.route
|
||||||
NavigationBarItem(
|
NavigationBarItem(
|
||||||
icon = {
|
icon = {
|
||||||
Crossfade(isCurrentDestination) {
|
Crossfade(isCurrentDestination, label = "nav-label") {
|
||||||
Icon(
|
Icon(
|
||||||
painter = if (it) navItem.selectedIcon else navItem.icon,
|
painter = if (it) navItem.selectedIcon else navItem.icon,
|
||||||
contentDescription = navItem.label.uppercase()
|
contentDescription = navItem.label.uppercase()
|
||||||
|
|
|
@ -157,7 +157,7 @@ private fun SaveButton(
|
||||||
isSaved: Boolean,
|
isSaved: Boolean,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
Crossfade(targetState = isSaved) { saved ->
|
Crossfade(targetState = isSaved, label = "save-button") { saved ->
|
||||||
Box(modifier = modifier.padding(12.dp)) {
|
Box(modifier = modifier.padding(12.dp)) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = if (saved) ClawIcons.Heart else ClawIcons.HeartBorder,
|
painter = if (saved) ClawIcons.Heart else ClawIcons.HeartBorder,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue