//
//  HomeNavigationBar.swift
//  SodaLive
//
//  Created by klaus on 2023/08/09.
//

import SwiftUI

struct HomeNavigationBar<Content: View>: View {
    
    let title: String
    let content: Content
    
    init(
        title: String,
        @ViewBuilder content: () -> Content
    ) {
        self.title = title
        self.content = content()
    }
    
    var body: some View {
        HStack {
            Text(title)
                .font(.custom(Font.bold.rawValue, size: 18.3))
                .foregroundColor(Color(hex: "eeeeee"))
            
            Spacer()
            
            content
        }
        .padding(.horizontal, 13.3)
        .frame(width: screenSize().width, height: 50, alignment: .center)
    }
}

struct HomeNavigationBar_Previews: PreviewProvider {
    static var previews: some View {
        HomeNavigationBar(title: "홈") {}
    }
}