generated from semicolondsm/Semicolon_Repository_Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a7faf7
commit 67cc2ca
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Application/Sources/Scene/Notification/Cell/NotificationListCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
Application/Sources/Scene/Notification/NotificationView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} |