// // 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) .appFont(size: 16.7, weight: isSelected ? .bold : .medium) .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: {} ) }