-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from IniongunIsaac/main
add progress bar configuration for easy customisation
- Loading branch information
Showing
4 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// ProgressBarConfig.swift | ||
// | ||
// | ||
// Created by Isaac Iniongun on 01/03/2024. | ||
// | ||
|
||
import SwiftUI | ||
|
||
public struct ProgressBarConfig { | ||
let height: CGFloat | ||
let spacing: CGFloat | ||
let activeColor: Color | ||
let inactiveColor: Color | ||
|
||
public init( | ||
height: CGFloat = 2, | ||
spacing: CGFloat = 5, | ||
activeColor: Color = .primary, | ||
inactiveColor: Color = .primary.opacity(0.5) | ||
) { | ||
self.height = height | ||
self.spacing = spacing | ||
self.activeColor = activeColor | ||
self.inactiveColor = inactiveColor | ||
} | ||
} |