Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add example back

Kiran K2007ab303e7d
diff --git a/packages/embeds/react/src/example/index.html b/packages/embeds/react/src/example/index.html
new file mode 100644
index 0000000000..5fdbec666b
--- /dev/null
+++ b/packages/embeds/react/src/example/index.html
@@ -0,0 +1,27 @@
+<html></html>
+ <head>
+ <script
+ src="https://unpkg.com/react@17/umd/react.development.js"
+ crossorigin
+ ></script>
+ <script
+ src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
+ crossorigin
+ ></script>
+ <script type="module" src="../../dist/embed.js"></script>
+ </head>
+ <body>
+ <script>
+ document.addEventListener("DOMContentLoaded", () => {
+ Dub.init({
+ token: "dub_embed_jnAD1TyhbTfCDfyAYFN5DR5ndXUXm9helYCX",
+ // trigger: "manual",
+ // placement: "center",
+ });
+ });
+ </script>
+
+ <!-- Custom toggle button -->
+ <button onclick="window.Dub.toggleWidget()">Click Me</button>
+ </body>
+</html>
\ No newline at end of file