From 0fae54a98df16d7bb04751ee54ac052f2f6b6eb0 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 13 Jul 2023 07:10:36 -0700 Subject: [PATCH] components: make GradientButtonStyle padding configurable There is too much padding on the follow hashtag button so we need to fix that --- damus/Components/GradientButtonStyle.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/damus/Components/GradientButtonStyle.swift b/damus/Components/GradientButtonStyle.swift index 39d35f66..c66f87ba 100644 --- 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)