Added the profile button in the navigation toolbar of the BrowseView view.

This commit is contained in:
Javier Cicchelli 2022-12-03 07:41:17 +01:00
parent e372641a58
commit f8507d9d00

View File

@ -61,9 +61,25 @@ struct BrowseView: View {
.listStyle(.inset)
.background(Color.red)
.navigationTitle("Folder name")
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button {
// ...
} label: {
Image.profile
.foregroundColor(.red)
}
}
}
}
}
// MARK: - Image+Constants
private extension Image {
static let profile = Image(systemName: "person.crop.circle.fill")
}
// MARK: - Previews
struct BrowseView_Previews: PreviewProvider {