로그인 페이지
This commit is contained in:
42
SodaLive/Sources/NavigationBar/HomeNavigationBar.swift
Normal file
42
SodaLive/Sources/NavigationBar/HomeNavigationBar.swift
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// 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: "홈") {}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user