search

Home  >  Q&A  >  body text

How to change React Bootstrap Modal.Header closeButton icon

<p>I'm using React Bootstrap Modal. I'm trying to change the <code>closeButton</code> icon. But it didn't work. </p> <pre class="brush:php;toolbar:false;"><Modal.Header className='modal-head' closeButton> <Modal.Title>Shopping Cart</Modal.Title> </Modal.Header></pre>
P粉563446579P粉563446579527 days ago505

reply all(1)I'll reply

  • P粉515066518

    P粉5150665182023-08-26 13:32:20

    I don't think the react-bootstrap library itself provides similar functionality. However, you can add an icon to the right alignment of the modal box head and add an onClick action, which can change the open state of the modal box and close it.

    reply
    0
  • Cancelreply