I want to add custom close button for antd modal. How can I do so?
This is my current close button
I want to add a custom image in place of it like this one.
This is the icon I want to add
CodePudding user response:
You can use API property called closeIcons on Model div like this:
<Modal
title="Modal 1000px width"
centered
visible={visible}
closeIcon={<LogoutOutlined />} // Choose any icon you need.
>
<p>some contents...</p>
<p>some contents...</p>
<p>some contents...</p>
</Modal>
Reference: antd API