diff --git a/Sources/Purace/Styles/PuraceStyle.swift b/Sources/Purace/Styles/PuraceStyle.swift index 37432f7..2a71faa 100644 --- a/Sources/Purace/Styles/PuraceStyle.swift +++ b/Sources/Purace/Styles/PuraceStyle.swift @@ -47,7 +47,7 @@ public struct PuraceStyle { public static let X3 = SwiftUI.Color(hex: "3B140E") ?? .gray public static let X4 = SwiftUI.Color(hex: "17293E") ?? .gray - public static let R1 = SwiftUI.Color(hex: "DB6262") ?? .red + public static let R1 = SwiftUI.Color(hex: "E24649") ?? .red public static let allSkeletons: [SwiftUI.Color] = [Color.S1, Color.S2, Color.S3, Color.S4, Color.S5, Color.S6, Color.S7, Color.S8] } diff --git a/Sources/Purace/Views/Basic/Snackbar/PuraceSnackbarView.swift b/Sources/Purace/Views/Basic/Snackbar/PuraceSnackbarView.swift index 5ec94b4..6a04e5e 100644 --- a/Sources/Purace/Views/Basic/Snackbar/PuraceSnackbarView.swift +++ b/Sources/Purace/Views/Basic/Snackbar/PuraceSnackbarView.swift @@ -9,7 +9,7 @@ import Foundation import SwiftUI struct PuraceSnackbarView: View { - @State var yOffset: CGFloat = 100 + @State var yOffset: CGFloat = 120 @State var opacity: Double = 0 let title: String @@ -45,7 +45,7 @@ struct PuraceSnackbarView: View { PuraceTextView(title, fontSize: 14, textColor: .white) Spacer() if let buttonTitle = buttonTitle { - PuraceButtonView(buttonTitle, fontSize: 14, type: .custom(.clear, .clear, .white)) { + PuraceButtonView(buttonTitle, fontSize: 14, type: .custom(.clear, .white.opacity(0.1), .white)) { buttonOnTap?() isVisible = false } @@ -53,16 +53,7 @@ struct PuraceSnackbarView: View { } .lineLimit(2) .padding() - .frame(width: UIScreen.main.bounds.width - 40) .background(getBackgroundColor()) - .cornerRadius(5) - .onChange(of: isVisible, perform: { _ in - withAnimation(.spring()) { - yOffset = 100 - opacity = 0 - } - }) - .opacity(opacity) .offset(x: 0, y: yOffset) .onAppear { withAnimation(.spring()) { @@ -70,7 +61,13 @@ struct PuraceSnackbarView: View { opacity = 1 } } - } + .edgesIgnoringSafeArea(.bottom) + }.onChange(of: isVisible, perform: { _ in + withAnimation(.spring()) { + yOffset = 120 + opacity = 0 + } + }) } }