native macOS codings agent orchestrator prowl.onev.cat
Something went wrong. Try again.
888 B · 32 lines
Swift
123456789101112131415161718192021222324252627282930313233import SwiftUI
struct PullRequestCheckStatusStyle { let symbol: String let color: Color let label: String
init(state: GithubPullRequestCheckState) { switch state { case .success: self.symbol = "checkmark.circle.fill" self.color = .green self.label = String(localized: "Success") case .failure: self.symbol = "xmark.circle.fill" self.color = .red self.label = String(localized: "Failed") case .inProgress: self.symbol = "arrow.triangle.2.circlepath.circle.fill" self.color = .yellow self.label = String(localized: "In progress") case .expected: self.symbol = "clock.circle.fill" self.color = .yellow self.label = String(localized: "Expected") case .skipped: self.symbol = "minus.circle.fill" self.color = .gray self.label = String(localized: "Skipped") } }}