Skip to content

Commit

Permalink
fix: Add vertical padding to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Oct 25, 2024
1 parent bbaa4a2 commit f1ecb06
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ struct IKButtonLayout: ViewModifier {
return IKButtonHeight.convert(controlSize: controlSize)
}

private var verticalPadding: CGFloat {
guard !isInlined else { return 0 }
return controlSize == .large ? IKPadding.medium : IKPadding.small
}

func body(content: Content) -> some View {
content
.padding(.horizontal, isInlined ? 0 : IKPadding.large)
.padding(.vertical, verticalPadding)
.frame(minHeight: minHeight)
}
}
Expand Down

0 comments on commit f1ecb06

Please sign in to comment.