Skip to content

Commit

Permalink
added ability to update color of spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicegginton committed May 26, 2019
1 parent b2a7d2b commit c2862ab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Spinner/Spinner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ public final class Spinner {
self.setSpeed(newSpeed)
}


public func updateColor(_ newColor: Color) {
self.color = newColor
}
/**
Stops the spinner and displays a green ✔ witht the provied text
Expand Down Expand Up @@ -144,6 +148,10 @@ public final class Spinner {
print(terminator: terminator)
}

func setColor(_ newColor: Color) {
self.color = newColor
}

func setPattern(_ newPattern: SpinnerPattern) {
self.text += Array(repeating: " ", count: self.getPatternPadding(newPattern))
self.pattern = newPattern
Expand Down

0 comments on commit c2862ab

Please sign in to comment.