feat(main): 메인 탭 화면을 추가한다

This commit is contained in:
Yu Sung
2026-05-19 15:54:37 +09:00
parent 270332d7c4
commit 1a5df53edb
26 changed files with 1580 additions and 2 deletions

View File

@@ -0,0 +1,45 @@
//
// MainTabBarButton.swift
// SodaLive
//
import SwiftUI
struct MainTabBarButton: View {
let tab: MainTab
let isSelected: Bool
let width: CGFloat
let action: () -> Void
var body: some View {
Button(action: action) {
VStack(spacing: 4) {
ZStack(alignment: .center) {
Image(isSelected ? tab.selectedIconName : tab.unselectedIconName)
}
.frame(height: 24)
Text(tab.title)
.appFont(.caption3)
.foregroundColor(isSelected ? Color.white : Color.gray600)
.frame(height: 12, alignment: .bottom)
}
.frame(width: width, alignment: .center)
.frame(minHeight: 50)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
}
}
struct MainTabBarButton_Previews: PreviewProvider {
static var previews: some View {
MainTabBarButton(
tab: .home,
isSelected: true,
width: UIScreen.main.bounds.width / 4,
action: {}
)
.background(Color.black)
}
}