Created
May 28, 2022 07:51
-
-
Save aqua30/2b11379194e274ed19d84e907601764e to your computer and use it in GitHub Desktop.
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 TimeDisplay( | |
time: TimeData = TimeData(), | |
) { | |
val timeUnitColor = if (time.isDataEmpty()) GRAY_TEXT else BLUE_LIGHT | |
Row( | |
horizontalArrangement = Arrangement.spacedBy(16.dp) | |
) { | |
TimeDisplayUnit( | |
time = time.hours, | |
unit = "h", | |
textColor = timeUnitColor | |
) | |
TimeDisplayUnit( | |
time = time.mins, | |
unit = "m", | |
textColor = timeUnitColor | |
) | |
TimeDisplayUnit( | |
time = time.secs, | |
unit = "s", | |
textColor = timeUnitColor | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment