Skip to content
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
6 changes: 3 additions & 3 deletions AIProject/iCo/Features/Base/RoundedButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ struct RoundedButton: View {

#Preview {
VStack {
RoundedButton(title: "With Image", imageName: "xmark", action: { dummyAction() })
RoundedButton(title: "With Image", imageName: "xmark", action: { })
.disabled(true)
RoundedButton(title: "Text Only", imageName: nil, action: { dummyAction() })
RoundedButton(title: nil, imageName: "xmark", action: { dummyAction() })
RoundedButton(title: "Text Only", imageName: nil, action: { })
RoundedButton(title: nil, imageName: "xmark", action: { })
}
.padding()
.background(.aiCoBackground)
Expand Down
4 changes: 2 additions & 2 deletions AIProject/iCo/Features/Base/RoundedRectangleButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct RoundedRectangleButton: View {

#Preview {
VStack {
RoundedRectangleButton(title: "가져오기") { dummyAction() }
RoundedRectangleButton(title: "가져오기", isActive: true) { dummyAction() }
RoundedRectangleButton(title: "가져오기") { }
RoundedRectangleButton(title: "가져오기", isActive: true) { }
}
}
40 changes: 17 additions & 23 deletions AIProject/iCo/Features/Base/RoundedRectangleFillButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,6 @@ struct RoundedRectangleFillButton: View {
}
}

#if DEBUG
func dummyAction() {
print("sayHi")
}
#endif

#Preview {
VStack(spacing: 16) {
HStack(spacing: 16) {
RoundedRectangleFillButton(title: "가져오기", imageName: "square.and.arrow.down", isHighlighted: .constant(false)) { dummyAction() }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(false)) { dummyAction() }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(false)) { dummyAction() }
.disabled(true)
}

VStack(spacing: 16) {
RoundedRectangleFillButton(title: "내보내기", isHighlighted: .constant(false)) { dummyAction() }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(true))
}
}
.padding(16)
}

struct RoundedRectangleFillButtonView: View {
let cornerRadius: CGFloat = 10

Expand Down Expand Up @@ -91,3 +68,20 @@ struct RoundedRectangleFillButtonView: View {
)
}
}

#Preview {
VStack(spacing: 16) {
HStack(spacing: 16) {
RoundedRectangleFillButton(title: "가져오기", imageName: "square.and.arrow.down", isHighlighted: .constant(false)) { }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(false)) { }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(false)) { }
.disabled(true)
}

VStack(spacing: 16) {
RoundedRectangleFillButton(title: "내보내기", isHighlighted: .constant(false)) { }
RoundedRectangleFillButton(title: "내보내기", imageName: "square.and.arrow.up", isHighlighted: .constant(true))
}
}
.padding(16)
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ struct TimestampWithRefreshButtonView: View {
}

#Preview {
TimestampWithRefreshButtonView(timestamp: Date.now, action: { dummyAction() })
TimestampWithRefreshButtonView(timestamp: Date.now, action: { })
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ struct RecomendationPlaceholderCardView: View {
}

#Preview {
RecomendationPlaceholderCardView(status: .cancel, message: "아이코가 추천할 코인을\n고르는 중이에요", action: dummyAction)
RecomendationPlaceholderCardView(status: .cancel, message: "아이코가 추천할 코인을\n고르는 중이에요", action: { })
}
2 changes: 1 addition & 1 deletion AIProject/iCo/Features/Onboarding/LastOnboardingPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ struct LastOnboardingPage: View {
}

#Preview {
LastOnboardingPage(isLandscape: .constant(true), onFinish: dummyAction)
LastOnboardingPage(isLandscape: .constant(true), onFinish: { })
.environmentObject(RecommendCoinViewModel())
}