adjust tappable area of text chip buttons

This commit is contained in:
Satindar Dhillon
2022-05-11 13:09:30 -07:00
parent d041c73fd1
commit 3410a58a89
2 changed files with 15 additions and 17 deletions

View File

@ -127,7 +127,7 @@ private let enableGrid = UIDevice.isIPad || FeatureFlag.enableGridCardsOnPhone
var body: some View {
VStack(spacing: 0) {
SearchBar(searchTerm: $viewModel.searchTerm, isSearching: $isSearching)
.padding(.bottom)
ZStack(alignment: .bottom) {
ScrollView(.horizontal, showsIndicators: false) {
HStack {

View File

@ -91,23 +91,21 @@ public struct TextChipButton: View {
let foregroundColor: Color
public var body: some View {
Button(action: onTap) {
VStack(spacing: 0) {
HStack {
Text(text)
.padding(.leading, 3)
Image(systemName: actionType.systemIconName)
}
.padding(.horizontal, 10)
.padding(.vertical, 8)
.font(.appFootnote)
.foregroundColor(foregroundColor)
.lineLimit(1)
.background(Capsule().fill(color))
Color.clear.contentShape(Rectangle()).frame(height: 15)
VStack(spacing: 0) {
HStack {
Text(text)
.padding(.leading, 3)
Image(systemName: actionType.systemIconName)
}
.contentShape(Rectangle())
.padding(.horizontal, 10)
.padding(.vertical, 8)
.font(.appFootnote)
.foregroundColor(foregroundColor)
.lineLimit(1)
.background(Capsule().fill(color))
}
.padding(.vertical, 12)
.contentShape(Rectangle())
.onTapGesture { onTap() }
}
}