title: In stencil js, how can i check if button has been clicked in another component from a different class
body: <p>I have a component called button.tsx, this components holds a function that does certain things when the button is clicked, this.saveSearch triggers the saveSearch() function.</p>
  <p>button.tsx</p>
  <pre><code>  {((this.test1) || this.selectedExistingId) &amp;&amp;
                        (&lt;button class=&quot;pdp-button primary&quot;
                            onClick={this.saveSearch}&gt;{this.langSave}&lt;/button&gt;)
                      }
  </code></pre>
  <p>In sentence.tsx i want to be able to see when this button is clicked and show a certain div if the user has clicked it.</p>
  <p>sentence.tsx</p>
  <pre><code>           {onClick={saveSearch} &amp;&amp;  (&lt;div class=&quot;styles-before-arrow&quot;&gt;{this.langConfirmSearchSaved}&lt;/div&gt;)}
  </code></pre>