@depay/widgets 7.15.1 → 7.15.2
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/README.md +44 -0
- package/dist/esm/index.bundle.js +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/umd/index.bundle.js +1 -1
- package/dist/umd/index.js +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -660,6 +660,28 @@ DePayWidgets.Payment({
|
|
|
660
660
|
})
|
|
661
661
|
```
|
|
662
662
|
|
|
663
|
+
Make sure to set the css value `position: relative;` for the container element. Otherwise it can not contain the widget.
|
|
664
|
+
|
|
665
|
+
React example:
|
|
666
|
+
|
|
667
|
+
```javascript
|
|
668
|
+
let CustomComponentWithWidget = (props)=>{
|
|
669
|
+
let container = useRef()
|
|
670
|
+
|
|
671
|
+
useEffect(()=>{
|
|
672
|
+
if(container.current) {
|
|
673
|
+
DePayWidgets.Payment({ ...defaultArguments, document,
|
|
674
|
+
container: container.current
|
|
675
|
+
})
|
|
676
|
+
}
|
|
677
|
+
}, [container])
|
|
678
|
+
|
|
679
|
+
return(
|
|
680
|
+
<div ref={container} style={{ position: 'relative', border: '1px solid black', width: "600px", height: "600px" }}></div>
|
|
681
|
+
)
|
|
682
|
+
}
|
|
683
|
+
```
|
|
684
|
+
|
|
663
685
|
#### style
|
|
664
686
|
|
|
665
687
|
`style`
|
|
@@ -1532,6 +1554,28 @@ DePayWidgets.Dontaion({
|
|
|
1532
1554
|
})
|
|
1533
1555
|
```
|
|
1534
1556
|
|
|
1557
|
+
Make sure to set the css value `position: relative;` for the container element. Otherwise it can not contain the widget.
|
|
1558
|
+
|
|
1559
|
+
React example:
|
|
1560
|
+
|
|
1561
|
+
```javascript
|
|
1562
|
+
let CustomComponentWithWidget = (props)=>{
|
|
1563
|
+
let container = useRef()
|
|
1564
|
+
|
|
1565
|
+
useEffect(()=>{
|
|
1566
|
+
if(container.current) {
|
|
1567
|
+
DePayWidgets.Payment({ ...defaultArguments, document,
|
|
1568
|
+
container: container.current
|
|
1569
|
+
})
|
|
1570
|
+
}
|
|
1571
|
+
}, [container])
|
|
1572
|
+
|
|
1573
|
+
return(
|
|
1574
|
+
<div ref={container} style={{ position: 'relative', border: '1px solid black', width: "600px", height: "600px" }}></div>
|
|
1575
|
+
)
|
|
1576
|
+
}
|
|
1577
|
+
```
|
|
1578
|
+
|
|
1535
1579
|
#### style
|
|
1536
1580
|
|
|
1537
1581
|
`style`
|