-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdev.bundle.html
122 lines (114 loc) · 5.53 KB
/
dev.bundle.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="https://depay.com/favicon.png"/>
<title>Development</title>
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script src="dist/umd/index.bundle.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap@5/dist/css/bootstrap.css">
<style>
.btn-primary {
color: #fff;
background-color: #ea357a !important;
border: 1px solid #ea357a !important;
padding: 0.35rem 1.2rem !important;
box-shadow: none;
outline: none;
}
.btn-primary:hover {
background-color: #db3071 !important;
}
</style>
</head>
<body style="background-color: #FAFAFA;">
<div class="container py-4">
<div class="py-2 pb-3 text-center">
<a href="https://depay.com" target="_blank">
<img alt="DePay" class="navbar-logo shadow-sm" src="https://depay.com/logo.svg" style="height: 50px; width: 50px; border-radius: 999px;"/>
</a>
</div>
<div class="row px-2">
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Payment</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Pay" widget="Payment" configuration='{"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg border" style="background: grey">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Donate</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Donate" widget="Donation" configuration='{ "accept": [{ "blockchain": "ethereum", "token": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb", "receiver": "0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02" }, { "blockchain": "bsc", "token": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb", "receiver": "0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02" }] }'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Buy</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Buy" widget="Sale" configuration='{ "sell": { "ethereum": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb" } }'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: css</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" css="button { background: green; border-radius: 0.4rem; }" label="Pay" widget="Payment" configuration='{"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: render with React</h5>
</div>
<div class="px-4 pb-3">
<div id="renderInto"></div>
<script>
let root = DePayButtons.createRoot(document.getElementById('renderInto'))
root.render(React.createElement(DePayButtons.DePayButton, {
label: 'Pay',
widget: 'Payment',
configuration: {"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}
}))
setTimeout(()=>{
console.log('RERENDER')
root.render(React.createElement(DePayButtons.DePayButton, {
label: 'Pay Up',
widget: 'Payment',
configuration: {"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}
}))
}, 2000)
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<script>DePayButtons.init({ document });</script>
</body>
</html>