Ability to set style for each item?
This is a feature request.
I'm trying to create a fontFamily dropdown, something like this (https://nardeas.github.io/react-font-picker/).

As you can see, the font family of each item is different, so the user could be able to see each font's style. But I cannot find a way to achieve this in react-select. Is it possible to set each item's style? Something like this.
<Select
name="form-field-name"
value={value}
onChange={this.handleChange}
options={[
{ value: 'one', label: 'One', style={fontFamily: 'Arial'} },
{ value: 'two', label: 'Two', style={fontFamily: 'Times New Roman'} },
]}
/>
Well, I found that this was actually supported. Thanks for making such an amazing component!
How did you do it? @searene 🙏
@stphnlngdncoding Exactly what I showed in the example.
@searene are you sure? because object cannot have a property set with '=', you have to use ':' but even setting it like that did not work for me.
It's a bit tricky, but the documentation covers it in "styles" section. I did it like this:
<Select
styles={{ option: (provided, state) => ({ ...provided, fontFamily: state.value })}}
name="form-field-name"
value={value}
onChange={this.handleChange}
options={[
{ value: 'Arial', label: 'Arial' },
{ value: 'Times New Roman', label: 'Times New Roman' },
]}
/>