|
|
|
@ -19,28 +19,31 @@ struct DoushiQiPicker<EnumType: RawRepresentable & Identifiable & Hashable>: Vie
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
|
Menu {
|
|
|
|
|
Picker(title, selection: $selectedOption) {
|
|
|
|
|
ForEach(options) { option in
|
|
|
|
|
Text(option.rawValue.description)
|
|
|
|
|
VStack(spacing: 0) {
|
|
|
|
|
Divider().background(Color.gray)
|
|
|
|
|
Menu {
|
|
|
|
|
Picker(title, selection: $selectedOption) {
|
|
|
|
|
ForEach(options) { option in
|
|
|
|
|
Text(option.rawValue.description)
|
|
|
|
|
.padding()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.labelsHidden()
|
|
|
|
|
.pickerStyle(InlinePickerStyle())
|
|
|
|
|
} label: {
|
|
|
|
|
HStack {
|
|
|
|
|
Text(title)
|
|
|
|
|
.foregroundColor(.black)
|
|
|
|
|
.padding()
|
|
|
|
|
Spacer()
|
|
|
|
|
Text(selectedOption.rawValue.description)
|
|
|
|
|
.foregroundColor(.black)
|
|
|
|
|
.padding()
|
|
|
|
|
}
|
|
|
|
|
.frame(maxWidth: .infinity)
|
|
|
|
|
.padding(EdgeInsets(top: 0, leading: 32, bottom: 0, trailing: 32))
|
|
|
|
|
}
|
|
|
|
|
.labelsHidden()
|
|
|
|
|
.pickerStyle(InlinePickerStyle())
|
|
|
|
|
} label: {
|
|
|
|
|
HStack {
|
|
|
|
|
Text(title)
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.padding()
|
|
|
|
|
Spacer()
|
|
|
|
|
Text(selectedOption.rawValue.description)
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.padding()
|
|
|
|
|
}
|
|
|
|
|
.frame(maxWidth: .infinity)
|
|
|
|
|
.padding(EdgeInsets(top: 10, leading: 32, bottom: 10, trailing: 32))
|
|
|
|
|
.background(Color.black)
|
|
|
|
|
.clipShape(Capsule())
|
|
|
|
|
Divider().background(Color.gray)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|