Currently the only way to get icons in the dropdown is to override the checkmark container and do some really hacky tricks.
It would also make doing styling easier if UsefulDropdownState was added to every style-able subcomponent (and options were passed id and optionValue)
AC:
- Add
iconPrefix/iconSuffix to OptionsProps
- Change the
StyledBaseSpan in the OptionItem to be a Text component
- Pass
iconPrefix and iconSuffix to the Text component
- Add
OptionItemText as a restyle-able/prop-able/ref-able subcomponent that is exported on the Dropdown
- Pass
OptionItem and OptionItemText the id and optionValue of their option
- Export
UsefulDropdownState in index.tsx
Currently the only way to get icons in the dropdown is to override the checkmark container and do some really hacky tricks.
It would also make doing styling easier if
UsefulDropdownStatewas added to every style-able subcomponent (and options were passedidandoptionValue)AC:
iconPrefix/iconSuffixtoOptionsPropsStyledBaseSpanin theOptionItemto be aTextcomponenticonPrefixandiconSuffixto the Text componentOptionItemTextas a restyle-able/prop-able/ref-able subcomponent that is exported on the DropdownOptionItemandOptionItemTexttheidandoptionValueof their optionUsefulDropdownStatein index.tsx