fwe
This commit is contained in:
parent
d805d0c660
commit
77a50a7dd2
@ -12,14 +12,25 @@ public struct SelectView: View {
|
||||
@State var title: String
|
||||
@Binding var text: String
|
||||
let variants: [String]
|
||||
let titleOne: String
|
||||
|
||||
public init(title: String, text: Binding<String>, variants: [String]) {
|
||||
public init(titleOne: String = "",title: String, text: Binding<String>, variants: [String]) {
|
||||
self.title = title
|
||||
self._text = text
|
||||
self.variants = variants
|
||||
self.titleOne = titleOne
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
if !titleOne.isEmpty {
|
||||
Text(titleOne)
|
||||
.robotoFlex(size: 14)
|
||||
.foregroundStyle(Color("hex#7E7E9A", bundle: .module))
|
||||
.tracking(0)
|
||||
.lineSpacing(20)
|
||||
.padding(.bottom, 4)
|
||||
}
|
||||
ZStack {
|
||||
Menu(content: {
|
||||
ForEach(variants, id: \.self) { variant in
|
||||
@ -55,6 +66,7 @@ public struct SelectView: View {
|
||||
}.padding(.horizontal, 14)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
Loading…
x
Reference in New Issue
Block a user