foundry-ui
foundry-ui copied to clipboard
Dropdown | Add iconPrefix and iconSuffix to OptionsProps (OptionItems), and export UsefulDropdownState
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/iconSuffixtoOptionsProps - Change the
StyledBaseSpanin theOptionItemto be aTextcomponent - Pass
iconPrefixandiconSuffixto the Text component - Add
OptionItemTextas a restyle-able/prop-able/ref-able subcomponent that is exported on the Dropdown - Pass
OptionItemandOptionItemTexttheidandoptionValueof their option - Export
UsefulDropdownStatein index.tsx