Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[trello.com/c/sI4VXuJa] UI: Style info/message snackbar #618

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down Expand Up @@ -49,3 +55,6 @@ private extension NotificationView {
}
}
}

private let pullDownIcon = "chevron.compact.down"
private let pullUpIcon = "chevron.compact.up"