mirror of
https://github.com/yJason/ClashX-Dashboard.git
synced 2026-03-01 00:35:19 +08:00
misc: SidebarLabel
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// SwiftUIView.swift
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SidebarLabel: View {
|
||||
@State var item: SidebarItem
|
||||
@State var iconName: String
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Image(systemName: iconName)
|
||||
.foregroundColor(.accentColor)
|
||||
Text(item.rawValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct SidebarLabel_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
SidebarLabel(item: .overview, iconName: "chart.bar.xaxis")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user