title: How to trigger close modal in Chakra UI?
body: <p>I am using Modal Component in Chakra UI to show Input editor post (Input editor is a children component wrapped by Modal component). I want to trigger close modal from Input editor component if data was fetched as succeed.</p>
  <p>Here's my component for Modal:</p>
  <pre><code>//...import component from Chakra Modal
  import {Post as PostModal} from '../components/Modal'
  
  export const Post = () =&gt; {
  
    const { isOpen, onOpen, onClose } = useDisclosure()
  
    return (
      &lt;div&gt;
    &lt;Modal onClose={onClose} size='full' isOpen={isOpen} trapFocus={false} &gt;
      &lt;ModalOverlay /&gt;
      &lt;ModalContent&gt;
        &lt;ModalHeader&gt;Add Post&lt;/ModalHeader&gt;
        &lt;ModalCloseButton /&gt;
        &lt;ModalBody&gt;
          &lt;div&gt;
            &lt;PostModal /&gt;
          &lt;/div&gt;
        &lt;/ModalBody&gt;
      &lt;/ModalContent&gt;
    &lt;/Modal&gt;
      &lt;/div&gt;
    )
  } 
  </code></pre>
  <p>And my code handle fetcher post data:</p>
  <pre><code>/components/Modal
  
  const fetcher = async (data) =&gt; {
    const _ = await sendPost(data);
    if (_) {
      //here i want to trigger close modal
    }
  }
  
  const PostInput = () =&gt; {
    return (
      //&lt;Input/&gt;
      //&lt;Textarea&gt; etc...
    )
  }
  </code></pre>
  <p>Who can help me please?</p>