forked from strongbox-password-safe/Strongbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuditNavigationLink.swift
More file actions
40 lines (32 loc) · 839 Bytes
/
AuditNavigationLink.swift
File metadata and controls
40 lines (32 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// AuditNavigationLink.swift
// Strongbox
//
// Created by Strongbox on 31/07/2024.
// Copyright © 2024 Mark McGuill. All rights reserved.
//
import SwiftUI
struct AuditNavigationLink<Content: View>: View {
var title: LocalizedStringKey
var count: LocalizedStringKey
@ViewBuilder
var content: Content
var body: some View {
NavigationLink(destination: content) {
HStack {
Image(systemName: "checkmark.shield")
.foregroundColor(.orange)
Text(title)
Spacer()
Text(count)
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
}
}
#Preview {
AuditNavigationLink<EmptyView>(title: "Test Title", count: "25") {
EmptyView()
}
}