File tree Expand file tree Collapse file tree
apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/ui
ui/components/src/main/kotlin/com/getcode/ui/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ private fun BottomBarAction(
182182 Badge (
183183 count = badgeCount,
184184 color = CodeTheme .colors.indicator,
185+ scale = 1.275f ,
185186 enterTransition = scaleIn(
186187 animationSpec = tween(
187188 durationMillis = 300 ,
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ fun Badge(
4444 color : Color = CodeTheme .colors.brand,
4545 contentColor : Color = Color .White ,
4646 textStyle : TextStyle = CodeTheme .typography.caption.copy(fontWeight = FontWeight .SemiBold ),
47+ scale : Float = 1f,
4748 enterTransition : EnterTransition = scaleIn(tween(durationMillis = 300)) + fadeIn(),
4849 exitTransition : ExitTransition = fadeOut() + scaleOut(tween(durationMillis = 300))
4950) {
@@ -59,17 +60,24 @@ fun Badge(
5960 else -> " $count "
6061 }
6162
63+ val scaledTextStyle = if (scale == 1f ) textStyle else textStyle.copy(
64+ fontSize = textStyle.fontSize * scale
65+ )
66+
6267 Box (
6368 modifier = Modifier
6469 .squareMinSize()
6570 .clip(CircleShape )
6671 .background(color)
67- .padding(horizontal = CodeTheme .dimens.grid.x1, vertical = 3 .dp),
72+ .padding(
73+ horizontal = CodeTheme .dimens.grid.x1 * scale,
74+ vertical = 3 .dp * scale,
75+ ),
6876 contentAlignment = Alignment .Center
6977 ) {
7078 Text (
7179 text = text,
72- style = textStyle ,
80+ style = scaledTextStyle ,
7381 color = contentColor,
7482 )
7583 }
You can’t perform that action at this time.
0 commit comments