Newer Older
39 lines | 1.034kb
Bogdan Timofte authored a week ago
1
//
2
//  SidebarLinkCardView.swift
3
//  USB Meter
4
//
5

            
6
import SwiftUI
7

            
8
struct SidebarLinkCardView: View {
9
    let title: String
10
    let subtitle: String
11
    let symbol: String
12
    let tint: Color
13

            
14
    var body: some View {
15
        HStack(spacing: 14) {
16
            Image(systemName: symbol)
17
                .font(.system(size: 18, weight: .semibold))
18
                .foregroundColor(tint)
19
                .frame(width: 42, height: 42)
20
                .background(Circle().fill(tint.opacity(0.18)))
21

            
22
            VStack(alignment: .leading, spacing: 4) {
23
                Text(title)
24
                    .font(.headline)
25
                Text(subtitle)
26
                    .font(.caption)
27
                    .foregroundColor(.secondary)
28
            }
29

            
30
            Spacer()
31

            
32
            Image(systemName: "chevron.right")
33
                .font(.footnote.weight(.bold))
34
                .foregroundColor(.secondary)
35
        }
36
        .padding(14)
37
        .meterCard(tint: tint, fillOpacity: 0.16, strokeOpacity: 0.22, cornerRadius: 18)
38
    }
39
}