LiveActivityCOBLabelView.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // LiveActivityCOBLabelView.swift
  3. // Trio
  4. //
  5. // Created by Cengiz Deniz on 17.10.24.
  6. //
  7. import Foundation
  8. import SwiftUI
  9. import WidgetKit
  10. struct LiveActivityCOBLabelView: View {
  11. var context: ActivityViewContext<LiveActivityAttributes>
  12. var additionalState: LiveActivityAttributes.ContentAdditionalState
  13. var body: some View {
  14. VStack(spacing: 2) {
  15. HStack {
  16. Text(
  17. "\(additionalState.cob)"
  18. ).fontWeight(.bold)
  19. .font(.title3)
  20. .foregroundStyle(context.isStale ? .secondary : .primary)
  21. .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
  22. Text("g")
  23. .font(.headline).fontWeight(.bold)
  24. .foregroundStyle(context.isStale ? .secondary : .primary)
  25. .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
  26. }
  27. Text("COB").font(.subheadline).foregroundStyle(.primary)
  28. }
  29. }
  30. }