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