my-button-sdk
Version:
A simple Button SDK that works in all front-end stacks.
24 lines (21 loc) • 632 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button SDK Demo</title>
<script src="index.js"></script> <!-- Include SDK -->
</head>
<body>
<h2>Test the Button SDK</h2>
<div id="button-container"></div> <!-- SDK Target Element -->
<script>
// Initialize the Button SDK
const sdk = new ButtonSDK("your-api-key", "Click Me", function() {
alert("Button Clicked!");
});
// Render the button inside #button-container
sdk.render("#button-container");
</script>
</body>
</html>