Skip to content

Commit

Permalink
include tap gesture conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Kaufman committed May 14, 2021
1 parent 1db8971 commit f8a41c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sources/SwipeCell/SlidableModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ public struct SlidableModifier: ViewModifier, Animatable {

content
.offset(self.contentOffset)
.onTapGesture(perform: flushState)


if !currentSlotsWidth.isZero {
Rectangle()
.foregroundColor(.white)
.opacity(0.001)
.onTapGesture(perform: flushState)
}

slotContainer
.offset(self.slotOffset)
.frame(width: self.totalSlotWidth)
Expand Down

0 comments on commit f8a41c6

Please sign in to comment.