Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Sources/BSWInterfaceKit/SwiftUI/Extensions/View+ViewBuilders.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// Created by Michele Restuccia on 25/2/26.
//

import SwiftUI

public extension View {

/// Expands the hit-testing area of a `Button` to the full view on iOS.
/// Not required on Android, where the default behavior already covers the whole view.
@ViewBuilder
func contentRectangleShape() -> some View {
#if canImport(Darwin)
self.contentShape(Rectangle())
#else
self
#endif
}
}
Loading