Improve notification View
This commit is contained in:
parent
eceb43f490
commit
b07a571fc2
@ -65,7 +65,7 @@ struct AppNotificationView: View {
|
|||||||
.padding(.horizontal, 16)
|
.padding(.horizontal, 16)
|
||||||
.padding(.vertical, 12)
|
.padding(.vertical, 12)
|
||||||
}
|
}
|
||||||
.frame(minWidth: 280, maxWidth: 380, minHeight: 44)
|
.frame(minWidth: 220, maxWidth: 750, minHeight: 44)
|
||||||
.background(
|
.background(
|
||||||
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
||||||
.fill(.clear)
|
.fill(.clear)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class NotificationManager {
|
|||||||
func showNotification(
|
func showNotification(
|
||||||
title: String,
|
title: String,
|
||||||
type: AppNotificationView.NotificationType,
|
type: AppNotificationView.NotificationType,
|
||||||
duration: TimeInterval = 5.0,
|
duration: TimeInterval = 3.0,
|
||||||
onTap: (() -> Void)? = nil
|
onTap: (() -> Void)? = nil
|
||||||
) {
|
) {
|
||||||
dismissTimer?.invalidate()
|
dismissTimer?.invalidate()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user