novuhq / docs

Novu documentation - The Masterpiece
https://docs.novu.co
43 stars 85 forks source link

feat(echo): Create Novu Echo Terminal web component #558

Closed rifont closed 7 months ago

rifont commented 8 months ago

What?

Why?

Testing HTML Method

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- NB: this is using `@echo-web-component` to target this branch. In prod, we omit this git-ref. -->
    <script id="echo-terminal-loader" src="https://cdn.jsdelivr.net/gh/novuhq/docs@echo-web-component/echo-terminal.js" type="text/javascript" crossorigin="anonymous"></script>
</head>
<body>
    <nv-echo-terminal></nv-echo-terminal>
</body>
</html>
image

JS Method

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        !function(e){if(!document.getElementById(e)){var t=document.createElement("script");t.src="https://cdn.jsdelivr.net/gh/novuhq/docs@echo-web-component/echo-terminal.js",t.type="text/javascript",t.crossOrigin="anonymous",t.id=e;var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):document.body.appendChild(t)}}("nv-echo-terminal-loader");
    </script>
</head>
<body>
    <nv-echo-terminal></nv-echo-terminal>
</body>
</html>
image

Demo: https://novu-preview-echo-web-component.mintlify.app/echo/quickstart

Screenshots The Usage Readme

image