Reputation: 85
I flow Use in create-react-app to create a react app with antd, but how to add a icon to a Tree.TreeNode?
Upvotes: 1
Views: 3067
Reputation: 316
Since TreeNode[title] can be any ReactElement (See it's doc https://ant.design/components/tree/#TreeNode-props), so that you can write like this <TreeNode key="theKey" title={<span><Icon type="link" />The title</span>} />
Upvotes: 3