시리즈 상세 추가
This commit is contained in:
42
SodaLive/Sources/UI/Component/SeriesDetailTabView.swift
Normal file
42
SodaLive/Sources/UI/Component/SeriesDetailTabView.swift
Normal 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: {}
|
||||
)
|
||||
}
|
27
SodaLive/Sources/UI/Component/SeriesKeywordChipView.swift
Normal file
27
SodaLive/Sources/UI/Component/SeriesKeywordChipView.swift
Normal 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: "#로맨스")
|
||||
}
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user