Partially change text color in Select (Ant Design)

Viewed 400

let's say you have this code:

 import {Select} from 'antd';

 const {Option} = Select;

 function handleChange (value) {
   console.log (`selected $ {value}`);
 }

 ReactDOM.render (
   <>
     <Select defaultValue = "maria" style = {{width: 120}} onChange = {handleChange}>
       <Option value = "maria"> A bola de Maria </Option>
       <Option value = "maria"> A bola de Maria </Option>
       <Option value = "maria"> A bola de Maria </Option>
     </Select>

I would like to change the color of the text but only half of it. ex:

Even: "A bola" - the text color would be black and "de Maria" would be blue

In logic it would look like this:

enter image description here

Can someone help me?

1 Answers

this is manuel but if you can want that's all!

<Option value="1" style={{color: 'blue'}}> <em style={{ fontStyle: 'normal', color: 'red' }}>example</em> 1 </Option>
Related