-
-
Save laevandus/c3b3822052c5a4da5ff522a92e78e981 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CollapsibleWheelPicker<SelectionValue, Content, Label>: View where SelectionValue: Hashable, Content: View, Label: View { | |
@Binding var selection: SelectionValue | |
@ViewBuilder let content: () -> Content | |
@ViewBuilder let label: () -> Label | |
var body: some View { | |
CollapsibleView(label: label) { | |
Picker(selection: $selection, content: content) { | |
EmptyView() | |
} | |
.pickerStyle(.wheel) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment