Skip to content

Commit

Permalink
[2.0.0] 공지 border 라인 마진 및 대표학과 칩 UI (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgvv authored Apr 14, 2024
1 parent 3b01733 commit a07e026
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
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 */,
CACC2F4B2B7E638C003142E2 /* KuringApp.entitlements */,
DF062D4A2AC87B6D00FC48C0 /* Info.plist */,
DFE7AB132AC332D200230934 /* Setting */,
Expand Down
File renamed without changes.
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

0 comments on commit a07e026

Please sign in to comment.