Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

ProjectIconPresentation.swift

46 lines1.4 KB

1import SwiftUI
2​
3enum ProjectIconPresentation {
4 static func symbol(_ name: String?) -> String {
5 switch name {
6 case "code", "code-xml", "code-2": "chevron.left.forwardslash.chevron.right"
7 case "terminal", "square-terminal": "terminal"
8 case "globe": "globe"
9 case "smartphone": "iphone"
10 case "monitor": "desktopcomputer"
11 case "server": "server.rack"
12 case "database": "externaldrive"
13 case "cloud": "cloud"
14 case "rocket": "paperplane"
15 case "box", "package": "shippingbox"
16 case "bug": "ladybug"
17 case "book", "book-open": "book"
18 case "heart": "heart"
19 case "star": "star"
20 case "zap": "bolt"
21 case "music": "music.note"
22 case "image": "photo"
23 case "gamepad", "gamepad-2": "gamecontroller"
24 case "cpu": "cpu"
25 case "wrench": "wrench"
26 case "git-branch": "arrow.triangle.branch"
27 default: "folder"
28 }
29 }
30​
31 static func color(_ name: String?) -> Color {
32 switch name {
33 case "red", "rose": .red
34 case "orange", "amber": .orange
35 case "yellow": .yellow
36 case "lime", "green", "emerald": .green
37 case "teal": .teal
38 case "cyan", "sky": .cyan
39 case "blue": .blue
40 case "indigo": .indigo
41 case "violet", "purple": .purple
42 case "fuchsia", "pink": .pink
43 default: T3Colors.textSecondary
44 }
45 }