Skip to content

Commit

Permalink
Adds a public init to the GaugeView struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Martinsson committed Sep 25, 2021
1 parent 19c2989 commit 1083d86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/GaugeKit/GaugeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ public struct GaugeView : View {
public var colors: [Color]
public var additionalInfo: GaugeAdditionalInfo?

public init(title: String? = nil,
value: Int? = nil,
colors: [Color],
additionalInfo: GaugeAdditionalInfo? = nil) {
self.title = title
self.value = value
self.colors = colors
self.additionalInfo = additionalInfo
}

public var body: some View {
ZStack {
ZStack {
Expand Down

0 comments on commit 1083d86

Please sign in to comment.