How antd card components support Rich text title?

problem description

the title attribute of the Card component of antD ( https://ant.design/components.), which, according to the documentation, supports not only the string type, but also the reactNode type.

document:

title = "Card title =" string | ReactNode

Code

<Card bordered={false}
      title={title} // 
      className={classNames.join(" ")}
      style={cardStyle}>
      <div>{content}</div>
</Card>

expectation

ask the great god, how to support rich text title? through ReactNode form (for example, < span class="style" > title )

Aug.13,2021

const  reactNode = () => <span className='style'>title</span>;
<Card bordered={false}
      title={reactNode()} // 
      className={classNames.join(' ')}
      style={cardStyle}>
      <div>{content}</div>
</Card>

or:

<Card bordered={false}
      title={React.createElement('span', {className:'style'}, title)} // 
      className={classNames.join(' ')}
      style={cardStyle}>
      <div>{content}</div>
</Card>

dangerouslySetInnerHTML , you can convert string to dom

<Card title={<div dangerouslySetInnerHTML={{__html: "<span class='style'>title</span>"}}></div>}></Card>
Menu