Skip to content

Commit

Permalink
fix: 검색 및 마이페이지 공통 컴포넌트 디자인 수정 (#51)
Browse files Browse the repository at this point in the history
fix: 검색 및 마이페이지 공통 컴포넌트 디자인 수정 (#51)
  • Loading branch information
hryeong66 committed Aug 6, 2024
1 parent f6893d6 commit 8be34cd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Projects/Core/DesignSystem/Sources/View/ListHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ public struct ListHeaderView: View {
}

public var body: some View {
HStack {
HStack(spacing: 8) {
icon
.resizable()
.frame(width: 20, height: 20, alignment: .center)
.padding(.leading, 20)
Text(title)
.font(Font.Heading.Small.semiBold)
Spacer()
}
.padding(.vertical, 18)
.padding(.horizontal, 20)
}
}

Expand Down
21 changes: 16 additions & 5 deletions Projects/Core/DesignSystem/Sources/View/Meme/MemeItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ struct MemeItemViewWithButton: View {
var body: some View {
ZStack(alignment: .bottomLeading) {
VStack {
ResizableMemeImageView(imageUrlString: memeDetail.imageUrlString, imageHeight: $imageHeight)
ResizableMemeImageView(
imageUrlString: memeDetail.imageUrlString,
imageHeight: $imageHeight
)
}
.frame(height: imageHeight)
HStack {
Expand All @@ -60,10 +63,10 @@ struct MemeItemViewWithButton: View {
height: 42,
image: ResourceKitAsset.Icon.copy.swiftUIImage,
action: {
print("Copy~~")
memeCopyHandler?(memeDetail)
}
)
.padding(20)
.padding(10)
}
}
}
Expand All @@ -82,7 +85,14 @@ struct ResizableMemeImageView: View {
.cacheMemoryOnly()
.onSuccess { result in
let ratio = geometry.size.width / result.image.size.width
imageHeight = result.image.size.height * ratio
let newHeight = result.image.size.height * ratio
if newHeight < 80 {
imageHeight = 80
} else if newHeight > 300 {
imageHeight = 300
} else {
imageHeight = newHeight
}
}
.cornerRadius(12)
.frame(height: imageHeight)
Expand Down Expand Up @@ -115,8 +125,9 @@ struct MemeItemInfoView: View {
var memeReactionView: some View {
HStack {
Text("ㅋㅋ")
.font(Font.Family2.outLine)
.font(Font.Family2.xlarge)
Text("\(reaction)")
.font(Font.Body.Small.medium)
}
.foregroundStyle(Color.Text.tertiary)
}
Expand Down
1 change: 1 addition & 0 deletions Projects/ResourceKit/Sources/Font.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ public struct Font {

public struct Family2 {
public static let outLine = ResourceKitFontFamily.SandollSamliphopangche.outline.swiftUIFont(size: 24)
public static let xlarge = ResourceKitFontFamily.SandollSamliphopangche.outline.swiftUIFont(size: 20)
}
}

0 comments on commit 8be34cd

Please sign in to comment.