-
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.
Browse files
Browse the repository at this point in the history
[Feature] RecordView 기록 출력 컴포넌트 구현 #57
- Loading branch information
Showing
4 changed files
with
83 additions
and
6 deletions.
There are no files selected for viewing
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
50 changes: 50 additions & 0 deletions
50
HongikYeolgong2/Presentation/Record/Component/RecordCell.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,50 @@ | ||
// | ||
// RecordCell.swift | ||
// HongikYeolgong2 | ||
// | ||
// Created by 최주원 on 11/5/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct RecordCell: View { | ||
let title: String | ||
let hours: Int | ||
let minutes: Int | ||
|
||
var body: some View { | ||
HStack{ | ||
VStack(alignment: .leading ,spacing: 8.adjustToScreenHeight) { | ||
Text(title) | ||
.font(.pretendard(size: 16, weight: .regular)) | ||
.foregroundStyle(.gray200) | ||
|
||
Text("\(hours)H \(minutes)M") | ||
.font(.pretendard(size: 16, weight: .semibold)) | ||
.foregroundStyle(.gray100) | ||
|
||
} | ||
.padding(.vertical, 18.adjustToScreenHeight) | ||
.padding(.leading, 28.adjustToScreenWidth) | ||
Spacer() | ||
} | ||
.frame(maxWidth: .infinity) | ||
.background(.gray800) | ||
.cornerRadius(4) | ||
.overlay( | ||
RoundedRectangle(cornerRadius: 4) | ||
.stroke( | ||
LinearGradient( | ||
gradient: Gradient(colors: [.gray400, .gray600]), | ||
startPoint: .topLeading, | ||
endPoint: .bottomTrailing | ||
), | ||
lineWidth: 1 | ||
) | ||
) | ||
} | ||
} | ||
|
||
#Preview { | ||
RecordCell(title: "연간", hours: 200, minutes: 4) | ||
} |
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
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