Created
August 31, 2022 15:15
-
-
Save PompaDonpa/ca5a278fc34e8e276c96011351231d02 to your computer and use it in GitHub Desktop.
Composable TopicChip w/animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun TopicChip(topic: Topic, selected: Boolean){ | |
val radius by animateDpAsState( | |
if (selected) 20.dp else 0.dp | |
) | |
Card( | |
shape = RoundedCornerShape( | |
topStart = radius | |
) | |
){ | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment