foundry-ui icon indicating copy to clipboard operation
foundry-ui copied to clipboard

Dropdown | Add iconPrefix and iconSuffix to OptionsProps (OptionItems), and export UsefulDropdownState

Open aVileBroker opened this issue 2 years ago • 0 comments

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

aVileBroker avatar Jun 22 '23 23:06 aVileBroker