38 lines
642 B
Swift
38 lines
642 B
Swift
//
|
|
// SQTabBar.swift
|
|
//
|
|
//
|
|
// Created by Victor on 18/07/2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SQTabBar: View {
|
|
@Binding var selection: Int
|
|
|
|
var body: some View {
|
|
HStack {
|
|
TabBarButton(imageName: "house", text: "Accueil")
|
|
}
|
|
}
|
|
}
|
|
|
|
private struct TabBarButton: View {
|
|
let imageName: String
|
|
let text: String
|
|
|
|
var body: some View {
|
|
VStack {
|
|
Image(systemName: imageName)
|
|
.renderingMode(.template)
|
|
.tint(.black)
|
|
.fontWeight(.bold)
|
|
Text(text)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
SQTabBar(selection: .constant(1))
|
|
}
|