Skip to content

Commit

Permalink
menu UI fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
makoni committed Oct 2, 2023
1 parent 05750c9 commit f78e242
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Demo/Demo/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,6 @@ struct MainView: View {
.environmentObject(api)
}
})

.actionSheet(isPresented: $isShowingAddFilesAlert, content: {
ActionSheet(
title: Text("Select source"),
message: Text(""),
buttons: [
.default(Text("Photos"), action: {
self.pickerType = .photos
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("Files"), action: {
self.pickerType = .files
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("External Sources"), action: {
self.widgetVisible = true
}),
.cancel()
]
)
})
.sheet(isPresented: $isShowingSheetWithPicker) {
if self.pickerType == .photos {
ImagePicker(sourceType: .photoLibrary) { (imageUrl) in
Expand Down Expand Up @@ -155,7 +134,28 @@ struct MainView: View {
self.filesListStore.uploadcare = self.api.uploadcare
}
self.isShowingAddFilesAlert.toggle()
}.buttonStyle(NeumorphicButtonStyle(bgColor: Color.gray.opacity(0.05)))
}
.buttonStyle(NeumorphicButtonStyle(bgColor: Color.gray.opacity(0.05)))
.actionSheet(isPresented: $isShowingAddFilesAlert, content: {
ActionSheet(
title: Text("Select source"),
message: Text(""),
buttons: [
.default(Text("Photos"), action: {
self.pickerType = .photos
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("Files"), action: {
self.pickerType = .files
self.isShowingSheetWithPicker.toggle()
}),
.default(Text("External Sources"), action: {
self.widgetVisible = true
}),
.cancel()
]
)
})
}
}
}
Expand Down

0 comments on commit f78e242

Please sign in to comment.