burger menu profile scroll
This commit is contained in:
parent
58e3488a9d
commit
1fdc8dbf45
@ -3,8 +3,14 @@ import SwiftUI
|
||||
struct SideMenuView: View {
|
||||
@Binding var isPresented: Bool
|
||||
|
||||
// Adjustable paddings
|
||||
private let topPadding: CGFloat = 66
|
||||
private let bottomPadding: CGFloat = 34
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 0) { // Parent VStack
|
||||
// Header
|
||||
VStack(alignment: .leading) {
|
||||
Image(systemName: "person.circle.fill")
|
||||
@ -17,10 +23,12 @@ struct SideMenuView: View {
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.secondary)
|
||||
}
|
||||
.padding(20)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.top, topPadding)
|
||||
.padding(.bottom, 20)
|
||||
|
||||
|
||||
// Menu Items
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
// Section 1
|
||||
VStack(alignment: .leading, spacing: 15) {
|
||||
@ -59,6 +67,8 @@ struct SideMenuView: View {
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading) // Align to the left
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
@ -71,6 +81,7 @@ struct SideMenuView: View {
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
.padding(.bottom, bottomPadding)
|
||||
}
|
||||
.background(Color(UIColor.systemBackground))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user