diff --git a/Piper/Sources/UI/Views/SettingsView.swift b/Piper/Sources/UI/Views/SettingsView.swift index 9580508..b960b87 100644 --- a/Piper/Sources/UI/Views/SettingsView.swift +++ b/Piper/Sources/UI/Views/SettingsView.swift @@ -10,15 +10,63 @@ import SwiftUI struct SettingsView: View { + // MARK: Properties + + @State private var viewModel: SettingsViewModel = .init() + // MARK: Body var body: some View { - Text("Hello, World!") - .padding() + Group { + if #available(macOS 15.0, *) { + TabView(selection: $viewModel.tabSelected) { + ForEach(viewModel.tabs) { tabItem in + Tab( + tabItem.title, + systemImage: tabItem.icon, + value: tabItem + ) { + switch tabItem { + case .repositories: + Text(tabItem.title) + } + } + } + } + } else { + TabView(selection: $viewModel.tabSelected) { + ForEach(viewModel.tabs) { tabItem in + Group { + switch tabItem { + case .repositories: + Text(tabItem.title) + } + } + .tabItem { + Text(tabItem.title) + } + .tag(tabItem) + } + } + } + } + .scenePadding() + .frame( + width: Layout.sizeView.width, + height: Layout.sizeView.height + ) } } +// MARK: - Layout + +private extension SettingsView { + enum Layout { + static let sizeView = CGSize(width: 350, height: 250) + } +} + // MARK: - Previews #Preview {