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

[2.0.0] 공지 border 라인 마진 및 대표학과 칩 UI #203

Merged
merged 5 commits into from
Apr 14, 2024
Merged
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
2 changes: 1 addition & 1 deletion KuringApp/KuringApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
A9DAFA472AB1F04B0064F748 = {
isa = PBXGroup;
children = (
1A0C8B412BCA5BB400B314C7 /* PrivacyInfo.xcprivacy */,
A9DAFA522AB1F04B0064F748 /* KuringApp */,
CA52DF302AD58DF2009B9272 /* KuringAppTests */,
A9DAFA512AB1F04B0064F748 /* Products */,
Expand All @@ -101,6 +100,7 @@
A9DAFA522AB1F04B0064F748 /* KuringApp */ = {
isa = PBXGroup;
children = (
1A0C8B412BCA5BB400B314C7 /* PrivacyInfo.xcprivacy */,
x-0o0 marked this conversation as resolved.
Show resolved Hide resolved
CACC2F4B2B7E638C003142E2 /* KuringApp.entitlements */,
DF062D4A2AC87B6D00FC48C0 /* Info.plist */,
DFE7AB132AC332D200230934 /* Setting */,
Expand Down
18 changes: 18 additions & 0 deletions package-kuring/Sources/UIKit/DepartmentUI/DepartmentRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Models
import SwiftUI
import ColorSet
import Dependencies
import DepartmentFeatures

public struct DepartmentRow: View {
Expand All @@ -17,10 +18,16 @@ public struct DepartmentRow: View {
case delete
case radio(Bool)
}

@Dependency(\.departments) var departments

public var body: some View {
HStack(alignment: .center) {
Text(department.korName)

if departments.getCurrent()?.id == department.id {
RepresentativeDepartmentChip
}

Spacer()

Expand Down Expand Up @@ -54,6 +61,17 @@ public struct DepartmentRow: View {
self.style = style
self.action = action
}

/// 대표 학과 여부를 나타내는 칩
private var RepresentativeDepartmentChip: some View {
Text("대표")
.font(.system(size: 12, weight: .semibold))
.foregroundStyle(Color.Kuring.primary)
.padding(.horizontal, 8)
.padding(.vertical, 2)
.background(Color.Kuring.primarySelected)
.clipShape(Capsule())
}
}

#Preview {
Expand Down
1 change: 1 addition & 0 deletions package-kuring/Sources/UIKit/NoticeUI/NoticeList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct NoticeList: View {

Divider()
.frame(height: 0.25)
.padding(.horizontal, 20)
}
}
.listRowSeparator(.hidden)
Expand Down