From 3e2339392ec0bdccef47e7458b0f84c32beeb0b7 Mon Sep 17 00:00:00 2001 From: hhhello Date: Sat, 7 Dec 2024 08:03:50 +0900 Subject: [PATCH] fix: Modal ux --- Source/DDS/Component/Modal/BaseModal.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/DDS/Component/Modal/BaseModal.swift b/Source/DDS/Component/Modal/BaseModal.swift index c5c4e77..8ebe995 100644 --- a/Source/DDS/Component/Modal/BaseModal.swift +++ b/Source/DDS/Component/Modal/BaseModal.swift @@ -2,14 +2,12 @@ import Foundation import SwiftUI struct BaseModal: View { - @Namespace var animation @State private var scaleEffect: CGFloat = 1.2 @Binding var isPresent: Bool @State var opacity: Double = 0.0 let backgroundColor: DodamColorable = DodamColor.Background.normal let cornerRadius: CGFloat = 16 -// let shadow: SeugiShadowSystem = .evBlack(.ev1) @ViewBuilder let content: () -> C @ViewBuilder let modalContent: () -> MC @@ -19,6 +17,9 @@ struct BaseModal: View { Color.black .opacity(0.2 * opacity) .ignoresSafeArea() + .onTapGesture { + self.isPresent = false + } // MARK: - Modal Content VStack { Spacer() @@ -26,14 +27,12 @@ struct BaseModal: View { modalContent() .background(backgroundColor) .cornerRadius(cornerRadius) - // .shadow(shadow) .scaleEffect(scaleEffect) .opacity(opacity) } else { modalContent() .background(backgroundColor) .cornerRadius(cornerRadius) - // .shadow(shadow) .opacity(opacity) } Spacer()