시리즈 상세 추가

This commit is contained in:
Yu Sung
2024-04-30 14:58:06 +09:00
parent 101b04b6a9
commit 93110eff8c
14 changed files with 913 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
//
// SeriesDetailTabView.swift
// SodaLive
//
// Created by klaus on 4/30/24.
//
import SwiftUI
struct SeriesDetailTabView: View {
let title: String
let width: CGFloat
let isSelected: Bool
let onClick: () -> Void
var body: some View {
VStack(spacing: 0) {
Text(title)
.font(.custom(isSelected ? Font.bold.rawValue : Font.medium.rawValue, size: 16.7))
.foregroundColor(isSelected ? Color.button : Color.gray77)
.frame(width: width, height: 50)
if isSelected {
Rectangle()
.foregroundColor(Color.button)
.frame(width: width, height: 3)
}
}
.contentShape(Rectangle())
.onTapGesture { onClick() }
}
}
#Preview {
SeriesDetailTabView(
title: "",
width: 180,
isSelected: true,
onClick: {}
)
}

View File

@@ -0,0 +1,27 @@
//
// SeriesKeywordChipView.swift
// SodaLive
//
// Created by klaus on 4/29/24.
//
import SwiftUI
struct SeriesKeywordChipView: View {
let keyword: String
var body: some View {
Text(keyword)
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(Color.grayd2)
.padding(.horizontal, 8)
.padding(.vertical, 5.3)
.background(Color.gray22)
.cornerRadius(26.7)
}
}
#Preview {
SeriesKeywordChipView(keyword: "#로맨스")
}

View File

@@ -22,8 +22,10 @@ extension Color {
static let gray55 = Color(hex: "555555")
static let gray77 = Color(hex: "777777")
static let gray90 = Color(hex: "909090")
static let gray97 = Color(hex: "979797")
static let graybb = Color(hex: "bbbbbb")
static let grayd2 = Color(hex: "d2d2d2")
static let grayd8 = Color(hex: "d8d8d8")
static let grayee = Color(hex: "eeeeee")
static let mainRed = Color(hex: "ff5c49")