erizocosmico / react-categorized-tag-input

React.js component for making tag autocompletion inputs with categorized results.
http://erizocosmico.github.io/react-categorized-tag-input/
MIT License
78 stars 18 forks source link

Enable tags to have distinct styles #7

Closed mheiber closed 8 years ago

mheiber commented 8 years ago

I need to apply colors to specific tags (some red, some blue, for example). Do you have a suggestion for the cleanest way to do this? I can do a PR. Proposal: an optional getTagStyle prop that is a function from tagName to a style object, which is then applied to the .cti__tag div and its children.

erizocosmico commented 8 years ago

Yes, that would be a really cool idea! You're welcome to open a PR with that :)

mheiber commented 8 years ago

@mvader thanks for getting back to me. Here's the PR: https://github.com/mvader/react-categorized-tag-input/pull/8 . I updated the sample and the readme to show how to use it. Looking forward to your feedback!

erizocosmico commented 8 years ago

Thanks for the PR!