mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Reuse ProgressButton
This commit is contained in:
parent
5b1cc4a93d
commit
4649ba0c8a
1 changed files with 6 additions and 10 deletions
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue