components: make GradientButtonStyle padding configurable
There is too much padding on the follow hashtag button so we need to fix that
This commit is contained in:
@@ -8,9 +8,15 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct GradientButtonStyle: ButtonStyle {
|
struct GradientButtonStyle: ButtonStyle {
|
||||||
|
let padding: CGFloat
|
||||||
|
|
||||||
|
init(padding: CGFloat = 16.0) {
|
||||||
|
self.padding = padding
|
||||||
|
}
|
||||||
|
|
||||||
func makeBody(configuration: Self.Configuration) -> some View {
|
func makeBody(configuration: Self.Configuration) -> some View {
|
||||||
return configuration.label
|
return configuration.label
|
||||||
.padding()
|
.padding(padding)
|
||||||
.foregroundColor(Color.white)
|
.foregroundColor(Color.white)
|
||||||
.background {
|
.background {
|
||||||
RoundedRectangle(cornerRadius: 12)
|
RoundedRectangle(cornerRadius: 12)
|
||||||
|
|||||||
Reference in New Issue
Block a user