Skip to content

Commit

Permalink
chore: add padding to AniTrendSwitch composables
Browse files Browse the repository at this point in the history
Adds padding to `AniTrendSwitch`, `AniTrendSwitchVariant`, `AniTrendSwitchWithDivider`, and `AniTrendSwitchWithContainer` compose components. The padding is added to the end of the switch for improved layout spacing. The `AniTrendSwitchWithDivider` switch also gets a padding start.
  • Loading branch information
wax911 committed Mar 6, 2025
1 parent 19006c2 commit 42a8d0f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ fun AniTrendSwitch(
}
Spacer(modifier = Modifier.weight(.1f))
Switch(
modifier = Modifier.align(Alignment.CenterVertically),
modifier = Modifier.padding(end = 8.dp).align(Alignment.CenterVertically),
checked = isCheckedState,
onCheckedChange = null,
interactionSource = interactionSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fun AniTrendSwitchVariant(
}
Spacer(modifier = Modifier.weight(.1f))
Switch(
modifier = Modifier.align(Alignment.CenterVertically),
modifier = Modifier.padding(end = 8.dp).align(Alignment.CenterVertically),
checked = isChecked,
onCheckedChange = null,
interactionSource = interactionSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fun AniTrendSwitchWithContainer(
}
Spacer(modifier = Modifier.weight(.1f))
Switch(
modifier = Modifier.padding(end = 8.dp),
checked = isChecked,
onCheckedChange = null,
interactionSource = interactionSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fun AniTrendSwitchWithDivider(
checked = isChecked,
onCheckedChange = { onChecked() },
modifier =
Modifier.padding(horizontal = 6.dp).semantics { contentDescription = title },
Modifier.padding(start = 6.dp, end = 8.dp).semantics { contentDescription = title },
enabled = isSwitchEnabled,
thumbContent = thumbContent,
)
Expand Down

0 comments on commit 42a8d0f

Please sign in to comment.