commit 0fae54a98df16d7bb04751ee54ac052f2f6b6eb0
parent 90818c12e8548b820785bab4844cc5e7c05791ae
Author: William Casarin <jb55@jb55.com>
Date: Thu, 13 Jul 2023 07:10:36 -0700
components: make GradientButtonStyle padding configurable
There is too much padding on the follow hashtag button so we need to fix
that
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/damus/Components/GradientButtonStyle.swift b/damus/Components/GradientButtonStyle.swift
@@ -8,9 +8,15 @@
import SwiftUI
struct GradientButtonStyle: ButtonStyle {
+ let padding: CGFloat
+
+ init(padding: CGFloat = 16.0) {
+ self.padding = padding
+ }
+
func makeBody(configuration: Self.Configuration) -> some View {
return configuration.label
- .padding()
+ .padding(padding)
.foregroundColor(Color.white)
.background {
RoundedRectangle(cornerRadius: 12)