LiveActivityBGLabelView.swift 596 B

1234567891011121314151617181920212223
  1. //
  2. // LiveActivityBGLabelView.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 LiveActivityBGLabelView: View {
  11. var context: ActivityViewContext<LiveActivityAttributes>
  12. var additionalState: LiveActivityAttributes.ContentAdditionalState
  13. var body: some View {
  14. Text(context.state.bg)
  15. .fontWeight(.bold)
  16. .font(.title3)
  17. .foregroundStyle(context.isStale ? .secondary : .primary)
  18. .strikethrough(context.isStale, pattern: .solid, color: .red.opacity(0.6))
  19. }
  20. }