PredictionPointView.swift 685 B

123456789101112131415161718192021222324
  1. import SwiftUI
  2. struct PredictionPointView: View {
  3. let predictionType: PredictionType
  4. let value: Int?
  5. var body: some View {
  6. Circle()
  7. .strokeBorder(
  8. getPredictionColor(for: predictionType, value: value),
  9. lineWidth: 1.5,
  10. antialiased: true
  11. )
  12. .frame(width: ChartsConfig.glucosePointSize, height: ChartsConfig.glucosePointSize)
  13. }
  14. }
  15. struct PredictionPointView_Previews: PreviewProvider {
  16. static var previews: some View {
  17. PredictionPointView(predictionType: .COB, value: 3)
  18. .preferredColorScheme(/*@START_MENU_TOKEN@*/ .dark/*@END_MENU_TOKEN@*/)
  19. }
  20. }