From 58d78da23fd55ede727494ba204f9f3d739882d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 10 Apr 2024 14:11:16 +0200 Subject: [PATCH] Make whole Ghost button tappable --- LocalPackages/DuckUI/Sources/DuckUI/Button.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/LocalPackages/DuckUI/Sources/DuckUI/Button.swift b/LocalPackages/DuckUI/Sources/DuckUI/Button.swift index 0e03e0277a..720ebd4386 100644 --- a/LocalPackages/DuckUI/Sources/DuckUI/Button.swift +++ b/LocalPackages/DuckUI/Sources/DuckUI/Button.swift @@ -103,6 +103,7 @@ public struct GhostButtonStyle: ButtonStyle { .frame(minWidth: 0, maxWidth: .infinity, maxHeight: Consts.height) .background(backgroundColor(configuration.isPressed)) .cornerRadius(Consts.cornerRadius) + .contentShape(Rectangle()) // Makes whole button area tappable, when there's no background } private func foregroundColor(_ isPressed: Bool) -> Color {