CustomProgressView.swift 777 B

123456789101112131415161718192021222324252627
  1. import SwiftUI
  2. struct CustomProgressView: View {
  3. let text: String
  4. @Environment(\.colorScheme) var colorScheme
  5. var body: some View {
  6. ZStack(alignment: .center) {
  7. RoundedRectangle(cornerRadius: 15)
  8. .fill(Color(.systemGray4))
  9. .clipShape(RoundedRectangle(cornerRadius: 15))
  10. .shadow(
  11. color: colorScheme == .dark ? Color(red: 0.02745098039, green: 0.1098039216, blue: 0.1411764706) :
  12. Color.black.opacity(0.33),
  13. radius: 3
  14. )
  15. .padding(.horizontal, 10)
  16. .frame(maxHeight: UIScreen.main.bounds.height / 11)
  17. ProgressView {
  18. Text(text)
  19. }
  20. }
  21. }
  22. }