How to hide antd Modal header

Viewed 3706

my question is how to hide ant modal header

enter image description here

how to remove my modal section ?
the simple code is :

export default React.memo(() => {
 return <Modal
        width={800} 
        footer={<div/>} 
       >
       
       </Modal>
 });

i try to put header in property but not working

2 Answers

The header text can be changed via the title prop. If you don't want a title at all, you can pass an empty string.

export default React.memo(() => {
  return (
    <Modal
      title=""
      width={800}
      footer={<div />}
    >
    </Modal>
  );
});

As of right now it seems you can get rid of the top part by just not supplying a value to the "title" prop.

Related