2024-MacC-M14-Medio / SqoopDesignSystem / Sources / SQComponents / CustomComponents / SQProgressBar.swift
SQProgressBar.swift
Raw
//
//  SQProgress.swift
//  Sqoop
//
//  Created by Greem on 10/11/24.
//

import SwiftUI
import SqoopDesignSystem

///      .
public struct SQProgressBar: View {
    @Binding var value: Double
    public init(value: Binding<Double>) {
        self._value = value
    }
    public var body: some View {
        ZStack {
            RoundedRectangle(cornerRadius: 2)
                .fill(Color.white)
                .frame(height: 4)
            
            ProgressView(value: value)
                .frame(height: 4)
                .tint(Color.bgPrimary)
                .progressViewStyle(.linear)
                .clipShape(RoundedRectangle(cornerRadius: 2)) //     
        }
    }
}

#Preview {
    @Previewable @State var value: Double = 0.4
    SQProgressBar(value: $value)
}