Open toastersocks opened 7 months ago
Right now the selection indicator is always a checkmark that matches SwiftUI's Picker. It might be nice for this to be configurable.
Picker
There should be a way to configure what the selection indicator is with the current checkmark being default.
Pass in a ViewBuilder closure to make the selection indicator be whatever we want.
ViewBuilder
There could be a default set of selection indicators such as checkmark, bullet, highlight, radioButton, etc...
We could combine these two approaches with a set of built-in indicators, but also allow a totally custom indicator.
I would lean more towards a view modifier rather than init parameter for this one.
Let's make it a modifier .selectionIndicator that takes a view or view builder
.selectionIndicator
Situation
Right now the selection indicator is always a checkmark that matches SwiftUI's
Picker
. It might be nice for this to be configurable.Solution
There should be a way to configure what the selection indicator is with the current checkmark being default.
Possible approaches
some View
Pass in a
ViewBuilder
closure to make the selection indicator be whatever we want.A set of defaults
There could be a default set of selection indicators such as checkmark, bullet, highlight, radioButton, etc...
Combo
We could combine these two approaches with a set of built-in indicators, but also allow a totally custom indicator.
View Modifier vs. init parameter
I would lean more towards a view modifier rather than init parameter for this one.