Skip to content

Commit

Permalink
⚡️ :: NotificationView Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarldud1234 committed Mar 15, 2023
1 parent 4a7faf7 commit 67cc2ca
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import SwiftUI

import SemicolonDesign

struct NotificationListCell: View {
let image: Image
let category: String
let content: String
let time: String

var body: some View {
HStack(alignment: .top, spacing: 0) {
image
.resizable()
.frame(width: 16, height: 16)
.padding(.trailing, 8)
VStack(alignment: .leading, spacing: 4) {
HStack {
Text(category)
.sdText(type: .caption)

Spacer()

Text(time)
.sdText(type: .caption)
}
Text(content)
.sdText(type: .body3, textColor: .GrayScale.gray900)
}
}
.padding(16)
}
}
22 changes: 22 additions & 0 deletions Application/Sources/Scene/Notification/NotificationView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import SwiftUI

struct NotificationView: View {
var body: some View {
VStack(spacing: 0) {
List(0..<10, id: \.self) { _ in
NotificationListCell(
image: .init(systemName: "checkmark.circle"),
category: "주말급식 신청",
content: "12월 주말 급식 신청이 곧 ㄹ아야아야러ㅇㄴㄹㄴㅇㄹ 마갑됩니다.",
time: "1시간 전"
)
.listRowSeparator(.hidden)
}
.listStyle(.inset)
}
.navigationTitle("알림")
.navigationBarTitleDisplayMode(.inline)
.setNavigationBackButton()
.navigationBarBackButtonHidden()
}
}

0 comments on commit 67cc2ca

Please sign in to comment.