Remove closeOnTap so snackbars dont steal focus

This commit is contained in:
Jackson Harper
2023-07-25 15:48:18 +08:00
parent cd2e35e02f
commit 0c81a04d06
4 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -273,7 +273,7 @@ struct AnimatingCellHeight: AnimatableModifier {
.autohideIn(2)
.position(.bottom)
.animation(.spring())
.closeOnTapOutside(true)
.isOpaque(false)
}
.onReceive(NSNotification.operationSuccessPublisher) { notification in
if let message = notification.userInfo?["message"] as? String {

File diff suppressed because one or more lines are too long

View File

@ -43,13 +43,14 @@ public struct Snackbar: View {
}
.frame(maxWidth: 380)
.frame(height: 44)
.padding(.horizontal, 15)
.padding(.horizontal, 10)
.background(self.colorScheme == .light ? Color.black : Color.white)
.cornerRadius(5)
.clipped()
Spacer(minLength: 20)
}
.padding(.horizontal, 10)
.background(Color.clear)
.frame(height: 44 + 22)
}