title: React - call parent method in child component after passing it
body: <p>I am trying to create a modal component in which i pass the content of the given modal as a child.</p>
  <pre><code>&lt; GGModal buttonLabel=&quot;Login&quot; content={
      &lt;LoginScreen
          setToken={setToken}
          token={token}
          setEmail={setEmail}
          email={email}
       /&gt;} /&gt;
  </code></pre>
  <p>and then in GGModal i display the content like this:</p>
  <pre><code>           &lt;Modal
                  isOpen={modalIsOpen}
                  onRequestClose={closeModal}
                  style={{
                      overlay: { zIndex: 2 },
                  }}
              &gt;
                  {content}
              &lt;/Modal&gt;
  </code></pre>
  <p>I would like to call a method defined in GGModal (closeModal) from any given content i pass to it. However I don't know how to pass props to the {content}</p>
  <p>Is it possible?</p>
  <p>Thanks</p>