In a React project, I'am using Ant Design (Antd) as CSS framework. So we have a requirement to change the styling of Modal which is the component of Antd. To change its border radius of Modal component is expected, but, with many attempts, all in vain. Is there any appropriate solution?
- Modal Component
<Modal
title="Basic Modal"
visible={isModalVisible}
onOk={handleOk}
onCancel={handleCancel}
className="modalStyle"
//bodyStyle={{ borderRadius: "20px" }} {/* Also tried with bodyStyle property */}
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</Modal>
index.css
.modalStyle {
border-radius: 20px;
}
.newStyle {
border-radius: 20px;
}
/* applied style to its root properties, but no change */
.ant-modal-content {
border-radius: 20px;
}
Following is the codesandbox link: https://codesandbox.io/s/basic-antd4168-forked-rz764
