Integrated the DismissableView component into the ProfileView view for the Profile module.
This commit is contained in:
parent
f65ecf556a
commit
ceb18a907c
@ -36,7 +36,7 @@ public struct ProfileView: View {
|
||||
// MARK: Body
|
||||
|
||||
public var body: some View {
|
||||
ZStack {
|
||||
DismissableView {
|
||||
ClearBackgroundList {
|
||||
Section {
|
||||
Image.photo
|
||||
@ -99,21 +99,6 @@ public struct ProfileView: View {
|
||||
.listRowBackground(Color.clear)
|
||||
}
|
||||
.background(Color.red)
|
||||
|
||||
VStack {
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Image.close
|
||||
.resizable()
|
||||
.frame(width: 32, height: 32)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .trailing)
|
||||
.padding([.top, .trailing], 24)
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +107,6 @@ public struct ProfileView: View {
|
||||
// MARK: - Images+Constants
|
||||
|
||||
private extension Image {
|
||||
static let close = Image(systemName: "xmark.circle.fill")
|
||||
static let photo = Image(systemName: "person.crop.circle.fill")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user