1egoman / fuzzy-picker

:mag: React component that implements a fuzzy picker (like sublime text's command pallete, or slack's channel switcher).
https://1egoman.github.io/fuzzy-picker
MIT License
76 stars 9 forks source link

Adding additional items within the FuzzyWrapper #14

Closed Luciam91 closed 6 years ago

Luciam91 commented 6 years ago

Is it currently possible to add additional items within the FuzzyWrapper component such as clickable links to exit the dialog?

If not I can look into adding this.

1egoman commented 6 years ago

I don't believe so, though if you want to manage the control of opening and closing the fuzzy picker, it might be better to extract the logic out of FuzzyWrapper that does this and add it to your own component, which then can render a FuzzyPicker component on its own, surrounding it with whatever other user interface components you'd like.

IMO (and my opinion could be changed), I think that if a user wants something more advanced then just rendering the picker then it probably makes sense to effectively write your own FuzzyWrapper, given the component isn't all that complicated and the majority of the logic is ~10 loc.

Luciam91 commented 6 years ago

This makes sense :)

If this isn't something you want to add to the package we can create our own component and go from there.

Thanks!

1egoman commented 6 years ago

Yep, I think I'd prefer to keep the FuzzyWrapper component as simple as possible, especially since writing your own wrapper should be so simple.