From d8a9c471dd583e352835a6c9315f68b2e455ae8f Mon Sep 17 00:00:00 2001 From: Iana Date: Mon, 23 Dec 2024 19:54:07 +0200 Subject: [PATCH 1/2] [trello.com/c/sI4VXuJa] UI: Style info/message snackbar: added pull-down separator --- .../Views/NotificationView.swift | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/PopupKit/Sources/PopupKit/Implementation/Views/NotificationView.swift b/PopupKit/Sources/PopupKit/Implementation/Views/NotificationView.swift index 7b759090f..d30848285 100644 --- a/PopupKit/Sources/PopupKit/Implementation/Views/NotificationView.swift +++ b/PopupKit/Sources/PopupKit/Implementation/Views/NotificationView.swift @@ -13,12 +13,18 @@ struct NotificationView: View { let model: NotificationModel var body: some View { - HStack(alignment: .top, spacing: 8) { - if let icon = model.icon { - makeIcon(image: icon) + VStack(alignment: .center, spacing: 5) { + HStack(alignment: .top, spacing: 10) { + if let icon = model.icon { + makeIcon(image: icon) + } + textStack + Spacer(minLength: .zero) } - textStack - Spacer(minLength: .zero) + + Image(systemName: isTextLimited ? pullDownIcon : pullUpIcon) + .font(.title) + .foregroundColor(.gray) } } } @@ -49,3 +55,6 @@ private extension NotificationView { } } } + +private let pullDownIcon = "chevron.compact.down" +private let pullUpIcon = "chevron.compact.up" From 306c23371be46a09273a1d6dfb6bdfbfafde5af2 Mon Sep 17 00:00:00 2001 From: Iana Date: Mon, 23 Dec 2024 19:57:00 +0200 Subject: [PATCH 2/2] [trello.com/c/sI4VXuJa] Added border color to snackbar --- .../Implementation/Views/NotificationPresenterView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PopupKit/Sources/PopupKit/Implementation/Views/NotificationPresenterView.swift b/PopupKit/Sources/PopupKit/Implementation/Views/NotificationPresenterView.swift index aa300c340..75aeefe07 100644 --- a/PopupKit/Sources/PopupKit/Implementation/Views/NotificationPresenterView.swift +++ b/PopupKit/Sources/PopupKit/Implementation/Views/NotificationPresenterView.swift @@ -31,8 +31,12 @@ struct NotificationPresenterView: View { isTextLimited: $isTextLimited, model: model ) - .padding([.leading, .trailing], 15) + .padding([.leading, .trailing], 10) .padding([.top, .bottom], 10) + .overlay( + RoundedRectangle(cornerRadius: 10) + .stroke(Color.init(uiColor:.adamant.chatInputBarBorderColor), lineWidth: 1) + ) .background(GeometryReader(content: processGeometry)) .expanded(axes: .horizontal) .offset(y: verticalDragTranslation < .zero ? verticalDragTranslation : .zero)