onairos 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/test-simple-button.html +41 -0
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Simple Onairos Button Test</title>
|
|
7
|
+
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
|
8
|
+
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
|
9
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root" class="p-8">
|
|
13
|
+
<h1 class="text-2xl font-bold mb-4">Simple Onairos Button Test</h1>
|
|
14
|
+
<div id="button-container"></div>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<script src="./dist/main.bundle.js"></script>
|
|
18
|
+
<script>
|
|
19
|
+
// Test the Onairos button
|
|
20
|
+
const { OnairosButton } = window.Onairos;
|
|
21
|
+
|
|
22
|
+
function handleComplete(result) {
|
|
23
|
+
console.log('Onboarding completed:', result);
|
|
24
|
+
alert('Onboarding completed! Check console for details.');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Create the button element
|
|
28
|
+
const buttonElement = React.createElement(OnairosButton, {
|
|
29
|
+
requestData: ['email', 'profile', 'social'],
|
|
30
|
+
webpageName: 'Test App',
|
|
31
|
+
onComplete: handleComplete,
|
|
32
|
+
buttonType: 'pill',
|
|
33
|
+
visualType: 'full',
|
|
34
|
+
textColor: 'black'
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Render the button
|
|
38
|
+
ReactDOM.render(buttonElement, document.getElementById('button-container'));
|
|
39
|
+
</script>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|