Skip to content

Commit

Permalink
[feat] #177 포킷카드 디자인 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
stealmh committed Jan 9, 2025
1 parent 2e1c430 commit 660c79d
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions Projects/DSKit/Sources/Components/PokitCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,22 @@ public struct PokitCard<Item: PokitCardItem & Shareable>: View {
.frame(height: 152)
}

@ViewBuilder
private var title: some View {
Text(category.categoryName)
.pokitFont(.b1(.b))
.foregroundStyle(.pokit(.text(.primary)))
let isPublic = category.openType == .공개

HStack(spacing: isPublic ? 2 : 0) {
if isPublic {
Image(.icon(.lock))
.resizable()
.frame(width: 18, height: 18)
.padding(.vertical, 3)
.foregroundStyle(.pokit(.icon(.tertiary)))
}
Text(category.categoryName)
.pokitFont(.b1(.b))
.foregroundStyle(.pokit(.text(.primary)))
}
}

private var kebabButton: some View {
Expand All @@ -81,11 +93,25 @@ public struct PokitCard<Item: PokitCardItem & Shareable>: View {
}
}

@ViewBuilder
private var subTitle: some View {
Text("링크 \(category.contentCount)")
.pokitFont(.detail2)
.foregroundStyle(.pokit(.text(.tertiary)))
.contentTransition(.numericText())
let isShared = category.userCount > 1

HStack(spacing: 2) {
Text("링크 \(category.contentCount)")
.contentTransition(.numericText())

if isShared {
Text("")
.pokitFont(.detail2)
Image(.iconMember)
.resizable()
.frame(width: 16, height: 16)
Text("\(category.userCount)")
}
}
.pokitFont(.detail2)
.foregroundStyle(.pokit(.text(.tertiary)))
}

@MainActor
Expand Down

0 comments on commit 660c79d

Please sign in to comment.