// // DropDownMenu.swift // AllIn // // Created by Emre on 19/10/2023. // import SwiftUI struct DropDownMenu: View { @State var expand = false @Binding var selectedOption: Int var options: [(Int, String, String)] var body: some View { VStack(spacing: 0, content: { Button(action: { self.expand.toggle() }) { HStack{ Image(options[selectedOption].1) .resizable() .scaledToFit() .frame(width: 15, height: 15) Text(options[selectedOption].2) .textStyle(weight: .bold, color: AllInColors.lightPurpleColor, size: 15) Spacer() Image(expand ? "chevronUpIcon" : "chevronDownIcon").resizable().frame(width: 15, height: 10).scaledToFill() } .padding([.leading, .trailing], 15) .frame(height: 43) } if expand { Rectangle() .frame(height: 1) .foregroundColor(AllInColors.delimiterGrey) .padding(.bottom, 18) VStack(spacing: 0) { ForEach(0..