title: How to create a popup menu on onclick?
body: <p>So, im trying to create a popup menu with greyed out background when the user clicks on a button in react
  My code looks something like this:</p>
  
  <pre><code>//ifButtonClicked called another class. this function only runs if another //button is clicked
  
  //some code
  export function ifButtonClicked(){
  var element = document.createElement("div");
  var post_settings = document.createElement("div");
  post_settings.className = "post_settings";
  post_settings.innerHTML = "button"
  post_settings.onclick = (event) =&gt; onClickPostSettings(event);
  element.append(post_settings);
  }
  
  function onClickPostSettings(event){
  
        //I want it to popup a menu here 
  }
  
  
  */
  
  </code></pre>
  
  <p>Since I cant use HTML tags, I am wondering if there any way I can implement a popup menu on onClick. Should i create a new class and call that class inside the onClickPostsettings?</p>