0

I'm using semantic ui's modal and they have a property called closeIcon that suppose to close the modal... But it doesn't close. I'm not sure but maybe because the modal's visibility is based on my state that's why their wrapper won't work?

Can I pass a function to the closeIcon prop instead?

Finks
  • 1,541
  • 2
  • 13
  • 23

1 Answers1

1

The property closeIcon takes true or false as an option and that is for displaying that close button and not actually closing the modal. There's another property namely open which actually closes the modal. What you need to do is pass true to closeIcon property and pass a function to onClose property in which you change the open state to false.

Arslan Tariq
  • 2,208
  • 2
  • 17
  • 42