svelte-ux icon indicating copy to clipboard operation
svelte-ux copied to clipboard

[SelectField] Standardize with MenuField / general improvements

Open techniq opened this issue 1 year ago • 4 comments

Extracted from PR #130

  • [x] Use same Options type instead of any
    • Will use label instead of name by default (can still be overwritten by optionText(), maybe we call this optionLabel(), or maybe we require the data to be processed ahead of time and remove this and optionValue()
  • [ ] Pass icon prop to MenuItem like MenuField
  • [x] Should we update the <SelectField icon={...} /> based on the selected <MenuItem icon={...} />?
    • Add a prop to opt-in to this functionality (activeOptionIcon or something)
    • Require the user to do this (like the SelectField example currently does.
  • [ ] Fix clicking on Chevon icon/button to close (re-toggles open) (#93)

techniq avatar Nov 14 '23 12:11 techniq

The first task is also in the Road to v1 issue

techniq avatar Nov 14 '23 12:11 techniq

Task 1 and 3 resolved via https://github.com/techniq/svelte-ux/pull/127.

techniq avatar Dec 19 '23 17:12 techniq

@willnationsdev Tagging you here if you're interested in knocking out these, but don't feel like you have to.

techniq avatar Dec 19 '23 17:12 techniq

Got a PR, but even with the icons added back in, the blue coloration they had before on the docs page is now gone. I'd bet there're styles somewhere in the docs that need to be adjusted. Cause you wouldn't wanna make a change like that to the component itself or to the theme that applies to everyone's usage of the SelectField's MenuItems - you just want the docs page. But the docs page didn't appear to have Tailwind classes is was merging in via attributes, so idk where those styles came from.

willnationsdev avatar Dec 19 '23 18:12 willnationsdev