view Simoleon/UI/Sidebar.swift @ 171:70f0625bfcf1

Merge pull request #17 from denniscm190/development open source project committer: GitHub <noreply@github.com>
author Dennis C. M. <dennis@denniscm.com>
date Tue, 12 Oct 2021 16:17:35 +0200
parents Simoleon/Helpers/Sidebar.swift@1fd9e27df5be Simoleon/Helpers/Sidebar.swift@f4e0c414cf6d
children
line wrap: on
line source

//
//  Sidebar.swift
//  Simoleon
//
//  Created by Dennis Concepción Martín on 18/07/2021.
//

import SwiftUI

struct Sidebar: View {
    var body: some View {
        List {
            NavigationLink(destination: ConversionView()) {
                Label("Convert", systemImage: "arrow.counterclockwise.circle")
            }
            .accessibilityIdentifier("NavigateToConversion")
            
            NavigationLink(destination: FavoritesView()) {
                Label("Favorites", systemImage: "star")
            }
            .accessibilityIdentifier("NavigateToFavorites")
            
            NavigationLink(destination: AboutView()) {
                Label("About", systemImage: "info.circle")
            }
            .accessibilityIdentifier("NavigateToSettings")
        }
        .listStyle(SidebarListStyle())
        .navigationTitle("Categories")
        .accessibilityIdentifier("Sidebar")
    }
}

struct Sidebar_Previews: PreviewProvider {
    static var previews: some View {
        NavigationView {
            Sidebar()
        }
    }
}