title: Cannot find name 'SP'.ts(2304)
body: <p>I am using following function to display url in the Model popup in sharepoint.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function openDialog(pageUrl) { 
            SP.UI.ModalDialog.showModalDialog( 
              { 
                url: pageUrl, 
                width: 700, 
                height: 700, 
                title: "Office Holidays" 
              } 
            ); 
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button onclick="openDialog('https://stackoverflow.com')"&gt; Click Me&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but It's giving me an error at SP namespace when I used same function in the SPFX using react.</p>
  
  <p>Is there anything I need to install or import?</p>