Reuse ProgressButton

This commit is contained in:
Daniel Chick 2023-11-25 19:19:59 -06:00
parent 5b1cc4a93d
commit 4649ba0c8a

View file

@ -39,16 +39,12 @@ struct InstallButton: View {
let xcode: Xcode?
var body: some View {
Button(action: install) {
if isLoading {
ProgressView()
.colorInvert()
.controlSize(.small)
} else {
Text("Install")
.textCase(.uppercase)
.help("InstallDescription")
}
ProgressButton(isInProgress: isLoading) {
install()
} label: {
Text("Install")
.textCase(.uppercase)
.help("InstallDescription")
}.buttonStyle(AppStoreButtonStyle(primary: false, highlighted: false))
}