Skip to content

Commit

Permalink
[#607] Review: Improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea authored and florentmaitre committed Sep 8, 2023
1 parent c42618a commit ab5e17f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.LinearProgressIndicator
import androidx.compose.material.Text
Expand Down Expand Up @@ -78,6 +79,8 @@ fun OdsLinearProgressIndicator(
horizontalArrangement = Arrangement.spacedBy(dimensionResource(id = R.dimen.spacing_s))
) {
icon?.Content()
Spacer(Modifier.width(ButtonDefaults.IconSpacing))

if (label != null) {
Text(
text = label,
Expand Down Expand Up @@ -143,7 +146,6 @@ class OdsLinearProgressIndicatorIcon : OdsComponentIcon {
@Composable
override fun Content(modifier: Modifier) {
super.Content(modifier = modifier.size(ButtonDefaults.IconSize))
Spacer(Modifier.size(ButtonDefaults.IconSpacing))
}
}

Expand Down

0 comments on commit ab5e17f

Please sign in to comment.