Skip to content

Commit

Permalink
Fix padding values on PreferenceButton
Browse files Browse the repository at this point in the history
  • Loading branch information
yasanglass committed Mar 17, 2024
1 parent a9a6192 commit 3b0988e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.sp
import glass.yasan.concrete.component.Icon
import glass.yasan.concrete.component.SpacerHorizontal
import glass.yasan.concrete.component.Text
import glass.yasan.concrete.theme.ConcreteTheme
import glass.yasan.spine.compose.foundation.grid
Expand Down Expand Up @@ -44,21 +45,25 @@ public fun PreferenceButton(
onClick = onClick,
),
start = {
startIcon?.let { icon ->
if (startIcon != null) {
Icon(
imageVector = icon,
imageVector = startIcon,
contentDescription = null,
modifier = Modifier.padding(2.grid),
)
} else {
SpacerHorizontal(width = 2.grid)
}
},
end = {
endIcon?.let { icon ->
if (endIcon != null) {
Icon(
imageVector = icon,
imageVector = endIcon,
contentDescription = null,
modifier = Modifier.padding(2.grid),
)
} else {
SpacerHorizontal(width = 2.grid)
}
},
applyPaddings = false,
Expand Down

0 comments on commit 3b0988e

Please sign in to comment.