Skip to content

Commit

Permalink
Fixed icon padding and size from params in IconProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
jeluchu committed Aug 16, 2023
1 parent 2734c0f commit a4b343d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ fun IconProgress(
verticalArrangement = Arrangement.spacedBy(5.dp)
) {
androidx.compose.material3.Icon(
modifier = Modifier.size(60.dp),
modifier = Modifier
.size(iconProgressCustom.iconSize)
.padding(iconProgressCustom.iconPadding),
imageVector = icon,
tint = when {
!enabled -> iconProgressCounter.disabledIndicator
Expand Down Expand Up @@ -169,7 +171,9 @@ fun IconProgress(
verticalArrangement = Arrangement.spacedBy(5.dp)
) {
Image(
modifier = Modifier.size(iconProgressCustom.iconSize),
modifier = Modifier
.size(iconProgressCustom.iconSize)
.padding(iconProgressCustom.iconPadding),
painter = icon,
colorFilter = when {
!enabled -> iconProgressCounter.disabledIndicator
Expand Down Expand Up @@ -228,6 +232,7 @@ fun IconProgress(
@Immutable
class IconProgressCustom constructor(
val iconSize: Dp = 50.dp,
val iconPadding: Dp = 10.dp,
val container: Color = Color.Gray,
val content: Color = Color.LightGray.copy(alpha = 0.3f),
val disabledIndicator: Color = Color(0xFF35898f),
Expand Down

0 comments on commit a4b343d

Please sign in to comment.