@stokr/components-library 2.3.63-beta.2 → 2.3.65-beta.1
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/dist/components/InfoIcon/InfoIcon.js +22 -49
- package/dist/components/InfoIcon/InfoIcon.styles.js +3 -3
- package/dist/components/LearnMorePage/LearnMoreExampleObject.js +7 -7
- package/dist/components/Payment/PaymentDisplay.js +176 -0
- package/dist/components/Payment/PaymentDisplay.stories.js +302 -0
- package/dist/components/Payment/TimerComponent.js +80 -0
- package/dist/components/Payment/TimerComponent.stories.js +236 -0
- package/dist/components/Timeline/Timeline.js +51 -0
- package/dist/components/Timeline/Timeline.stories.js +393 -0
- package/dist/components/Timeline/Timeline.styles.js +74 -0
- package/dist/components/Timeline/TimelineStep.js +88 -0
- package/dist/components/Timeline/index.js +19 -0
- package/dist/components/TransactionDetails/TransactionDetailsTable.js +64 -0
- package/dist/components/TransactionDetails/TransactionDetailsTable.stories.js +305 -0
- package/dist/context/Checkbox/CheckboxContext.js +81 -7
- package/dist/index.js +44 -77
- package/dist/static/images/bitcoin-logo.svg +9 -0
- package/dist/static/images/check-icon.svg +3 -0
- package/dist/static/images/cross-icon.svg +3 -0
- package/dist/static/images/usdc-logo.svg +5 -0
- package/dist/static/images/usdq-logo.png +0 -0
- package/package.json +1 -5
- package/dist/static/images/1.svg +0 -4
- package/dist/static/images/2.svg +0 -4
- package/dist/static/images/3.svg +0 -3
- package/dist/static/images/4.svg +0 -3
- package/dist/static/images/amazon-logo.png +0 -0
- package/dist/static/images/avatar-cog.png +0 -0
- package/dist/static/images/avatar.png +0 -0
- package/dist/static/images/camera.svg +0 -1
- package/dist/static/images/document-back.svg +0 -1
- package/dist/static/images/document-small.svg +0 -1
- package/dist/static/images/document.svg +0 -1
- package/dist/static/images/favicon.png +0 -0
- package/dist/static/images/hdd.png +0 -0
- package/dist/static/images/lemonway.png +0 -0
- package/dist/static/images/member-item-picture.png +0 -0
- package/dist/static/images/nav_green.svg +0 -31
- package/dist/static/images/one.jpg +0 -0
- package/dist/static/images/passport.svg +0 -1
- package/dist/static/images/profile-picture-placeholder.png +0 -0
- package/dist/static/images/profile-picture-placeholder.svg +0 -1
- package/dist/static/images/profile-picture.png +0 -0
- package/dist/static/images/shark.jpg +0 -0
- package/dist/static/images/three.jpg +0 -0
- package/dist/static/images/two-sided-document.svg +0 -26
- package/dist/static/images/two.jpg +0 -0
- package/dist/static/images/user-profile.png +0 -0
- package/dist/static/images/whales.png +0 -0
|
@@ -4,20 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.InfoIcon = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var
|
|
10
|
-
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
9
|
+
var _reactTippy = require("react-tippy");
|
|
11
10
|
var _InfoIcon = require("./InfoIcon.styles");
|
|
12
|
-
const _excluded = ["title", "html", "position", "noMargin", "noMarginLeft", "noMarginRight", "noIcon", "disabled", "fullWidth", "
|
|
11
|
+
const _excluded = ["title", "html", "position", "noMargin", "noMarginLeft", "noMarginRight", "noIcon", "disabled", "fullWidth", "outline", "containerStyle"];
|
|
13
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
20
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
14
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
22
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
23
16
|
const InfoIcon = _ref => {
|
|
@@ -31,50 +24,29 @@ const InfoIcon = _ref => {
|
|
|
31
24
|
noIcon,
|
|
32
25
|
disabled,
|
|
33
26
|
fullWidth,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
arrowColor
|
|
27
|
+
outline,
|
|
28
|
+
containerStyle
|
|
37
29
|
} = _ref,
|
|
38
30
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
|
|
40
|
-
const tooltipIdRef = (0, _react.useRef)("info-icon-".concat(Math.random().toString(36).substr(2, 9)));
|
|
41
|
-
const tooltipId = tooltipIdRef.current;
|
|
42
|
-
const content = html || title;
|
|
43
|
-
const styles = _objectSpread({
|
|
44
|
-
borderRadius: '10px',
|
|
45
|
-
fontSize: '13px',
|
|
46
|
-
lineHeight: '20px',
|
|
47
|
-
letterSpacing: '0.4px',
|
|
48
|
-
padding: '20px',
|
|
49
|
-
wordBreak: 'break-word',
|
|
50
|
-
boxShadow: ['0 0 12px 8px rgba(0, 0, 0, 0.03)', '0 0 6px 3px rgba(0, 0, 0, 0.02)'],
|
|
51
|
-
fontWeight: 'normal',
|
|
52
|
-
width: 'auto'
|
|
53
|
-
}, customStyles);
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_InfoIcon.Container, {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_InfoIcon.Container, {
|
|
55
32
|
noMargin: noMargin,
|
|
56
33
|
noMarginLeft: noMarginLeft,
|
|
57
34
|
noMarginRight: noMarginRight,
|
|
58
35
|
fullWidth: fullWidth,
|
|
59
36
|
style: containerStyle
|
|
60
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
offset: 15,
|
|
74
|
-
opacity: 1,
|
|
75
|
-
arrowSize: 10,
|
|
76
|
-
style: styles
|
|
77
|
-
}, props)));
|
|
37
|
+
}, /*#__PURE__*/_react.default.createElement(_reactTippy.Tooltip, _extends({}, props, {
|
|
38
|
+
position: position,
|
|
39
|
+
title: title,
|
|
40
|
+
html: html,
|
|
41
|
+
theme: "light",
|
|
42
|
+
arrow: true,
|
|
43
|
+
duration: 200
|
|
44
|
+
// onRequestClose={() => console.log('request to close tooltip')}
|
|
45
|
+
,
|
|
46
|
+
disabled: disabled
|
|
47
|
+
}), noIcon ? props.children : /*#__PURE__*/_react.default.createElement(_InfoIcon.Icon, {
|
|
48
|
+
outline: outline
|
|
49
|
+
})));
|
|
78
50
|
};
|
|
79
51
|
exports.InfoIcon = InfoIcon;
|
|
80
52
|
InfoIcon.propTypes = {
|
|
@@ -84,7 +56,7 @@ InfoIcon.propTypes = {
|
|
|
84
56
|
noMargin: _propTypes.default.bool,
|
|
85
57
|
noMarginLeft: _propTypes.default.bool,
|
|
86
58
|
noMarginRight: _propTypes.default.bool,
|
|
87
|
-
|
|
59
|
+
outline: _propTypes.default.bool
|
|
88
60
|
};
|
|
89
61
|
InfoIcon.defaultProps = {
|
|
90
62
|
title: null,
|
|
@@ -92,6 +64,7 @@ InfoIcon.defaultProps = {
|
|
|
92
64
|
position: 'bottom',
|
|
93
65
|
noMargin: false,
|
|
94
66
|
noMarginLeft: false,
|
|
95
|
-
noMarginRight: false
|
|
67
|
+
noMarginRight: false,
|
|
68
|
+
outline: false
|
|
96
69
|
};
|
|
97
70
|
var _default = exports.default = InfoIcon;
|
|
@@ -11,9 +11,9 @@ const Container = exports.Container = _styledComponents.default.div.withConfig({
|
|
|
11
11
|
displayName: "InfoIconstyles__Container",
|
|
12
12
|
componentId: "sc-d3sdn3-0"
|
|
13
13
|
})(["display:inline-block;vertical-align:middle;margin:0 12px;font-size:0;line-height:0;", " ", " ", " ", " & > div{position:relative;display:inline-block !important;", "}"], props => props.noMargin && "\n margin: 0;\n ", props => props.noMarginLeft && "\n margin-left: 0;\n ", props => props.noMarginRight && "\n margin-right: 0;\n ", props => props.fullWidth && "\n width: 100%;\n height: 100%;\n ", props => props.fullWidth && "\n width: 100%;\n height: 100%;\n display: flex !important;\n align-content: center;\n flex-wrap: wrap;\n justify-content: center;\n ");
|
|
14
|
-
const Icon = exports.Icon = _styledComponents.default.i.attrs({
|
|
15
|
-
className: 'ion ion-md-information-circle'
|
|
16
|
-
}).withConfig({
|
|
14
|
+
const Icon = exports.Icon = _styledComponents.default.i.attrs(props => ({
|
|
15
|
+
className: props.outline ? 'ion ion-md-information-circle-outline' : 'ion ion-md-information-circle'
|
|
16
|
+
})).withConfig({
|
|
17
17
|
displayName: "InfoIconstyles__Icon",
|
|
18
18
|
componentId: "sc-d3sdn3-1"
|
|
19
19
|
})(["position:relative;left:-0.4px;display:inline-block;vertical-align:middle;font-size:16px;line-height:16px;vertical-align:middle;color:", ";transition:color 0.2s;&:hover{color:", ";}"], props => _theme.default.cGrey2, props => _theme.default.cPrimary);
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.LearnMoreExampleObject = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _avatarPlaceholder = _interopRequireDefault(require("../../static/images/avatar-placeholder.png"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const LearnMoreExampleObject = exports.LearnMoreExampleObject = {
|
|
10
10
|
categories: [{
|
|
@@ -57,7 +57,7 @@ const LearnMoreExampleObject = exports.LearnMoreExampleObject = {
|
|
|
57
57
|
content: '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>',
|
|
58
58
|
postType: 'video',
|
|
59
59
|
videoSrc: '',
|
|
60
|
-
cover:
|
|
60
|
+
cover: _avatarPlaceholder.default
|
|
61
61
|
}, {
|
|
62
62
|
id: 'category21',
|
|
63
63
|
title: 'Get a 21 tast of token investing',
|
|
@@ -65,21 +65,21 @@ const LearnMoreExampleObject = exports.LearnMoreExampleObject = {
|
|
|
65
65
|
content: '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p><h4>Lorem ipsum dolor</h4><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>',
|
|
66
66
|
postType: 'video',
|
|
67
67
|
videoSrc: '',
|
|
68
|
-
cover:
|
|
68
|
+
cover: _avatarPlaceholder.default
|
|
69
69
|
}, {
|
|
70
70
|
id: 'category22',
|
|
71
71
|
title: 'Get a 22 tast of token investing',
|
|
72
72
|
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
73
|
-
content: "\n <h5>Our vision</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <h5>Our vision list</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <ul>\n <li>List item 1</li>\n <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et</li>\n </ul>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <img src=\"".concat(
|
|
73
|
+
content: "\n <h5>Our vision</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <h5>Our vision list</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <ul>\n <li>List item 1</li>\n <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et</li>\n </ul>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <img src=\"".concat(_avatarPlaceholder.default, "\" alt=\"\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n "),
|
|
74
74
|
postType: 'text',
|
|
75
|
-
cover:
|
|
75
|
+
cover: _avatarPlaceholder.default
|
|
76
76
|
}, {
|
|
77
77
|
id: 'category31',
|
|
78
78
|
title: 'Get a 3 tast of token investing',
|
|
79
79
|
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
80
|
-
content: "\n <h5>Our vision</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <h5>Our vision list</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <ul>\n <li>List item 1</li>\n <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et</li>\n </ul>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <img src=\"".concat(
|
|
80
|
+
content: "\n <h5>Our vision</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <h5>Our vision list</h5>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <ul>\n <li>List item 1</li>\n <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et</li>\n </ul>\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n <img src=\"".concat(_avatarPlaceholder.default, "\" alt=\"\" />\n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n "),
|
|
81
81
|
postType: 'text',
|
|
82
|
-
cover:
|
|
82
|
+
cover: _avatarPlaceholder.default
|
|
83
83
|
}]
|
|
84
84
|
};
|
|
85
85
|
var _default = exports.default = LearnMoreExampleObject;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.PaymentDisplay = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
10
|
+
var _Text = require("../Text/Text.styles");
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
12
|
+
var _copyToClipboard = require("../../utils/copyToClipboard");
|
|
13
|
+
var _CryptoAddress = require("../CryptoAddress/CryptoAddress.styles");
|
|
14
|
+
var _QRCode = _interopRequireDefault(require("../QRCode/QRCode"));
|
|
15
|
+
var _SectionTitle = require("../SectionTitle/SectionTitle.styles");
|
|
16
|
+
var _reactTippy = require("react-tippy");
|
|
17
|
+
var _Grid = require("../Grid/Grid.styles");
|
|
18
|
+
var _rwd = _interopRequireDefault(require("../../styles/rwd"));
|
|
19
|
+
var _usdcLogo = _interopRequireDefault(require("../../static/images/usdc-logo.svg"));
|
|
20
|
+
var _usdqLogo = _interopRequireDefault(require("../../static/images/usdq-logo.png"));
|
|
21
|
+
var _bitcoinLogo = _interopRequireDefault(require("../../static/images/bitcoin-logo.svg"));
|
|
22
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
25
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
26
|
+
const CodeWrapper = _styledComponents.default.div.withConfig({
|
|
27
|
+
displayName: "PaymentDisplay__CodeWrapper",
|
|
28
|
+
componentId: "sc-bsemn3-0"
|
|
29
|
+
})(["background:", ";border:1px solid ", ";box-shadow:2px 4px 14px 0px rgb(196,196,196,0.25);border-radius:5px;padding:32px 64px;display:flex;flex-direction:column;align-items:center;gap:32px;margin:auto;max-width:", ";"], _colors.default.grey3, _colors.default.grey3, props => props.maxWidth || '550px');
|
|
30
|
+
const AmountSection = _styledComponents.default.div.withConfig({
|
|
31
|
+
displayName: "PaymentDisplay__AmountSection",
|
|
32
|
+
componentId: "sc-bsemn3-1"
|
|
33
|
+
})(["display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px;margin:14px 0 8px 0;> :nth-child(3){margin-left:-8px;}span{font-weight:400;text-transform:uppercase;line-height:28px;font-size:18px;letter-spacing:0.8px;", "}"], _rwd.default.XLarge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 22px;\n "]))));
|
|
34
|
+
const AmountText = (0, _styledComponents.default)(_Text.Text).withConfig({
|
|
35
|
+
displayName: "PaymentDisplay__AmountText",
|
|
36
|
+
componentId: "sc-bsemn3-2"
|
|
37
|
+
})(["font-size:24px;font-weight:800;text-transform:uppercase;line-height:40px;letter-spacing:1.5px;word-wrap:break-word;", ""], _rwd.default.XLarge(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 34px;\n "]))));
|
|
38
|
+
const AmountIcon = _styledComponents.default.img.withConfig({
|
|
39
|
+
displayName: "PaymentDisplay__AmountIcon",
|
|
40
|
+
componentId: "sc-bsemn3-3"
|
|
41
|
+
})(["width:24px;height:24px;", ""], _rwd.default.XLarge(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width:32px;\n height:32px;\n "]))));
|
|
42
|
+
const AddressText = _styledComponents.default.p.withConfig({
|
|
43
|
+
displayName: "PaymentDisplay__AddressText",
|
|
44
|
+
componentId: "sc-bsemn3-4"
|
|
45
|
+
})(["letter-spacing:0.6%;word-break:break-all;font-size:16px;font-weight:700;line-height:24px;letter-spacing:0.1;margin:0;margin-top:14px;"]);
|
|
46
|
+
const AddressDescription = _styledComponents.default.p.withConfig({
|
|
47
|
+
displayName: "PaymentDisplay__AddressDescription",
|
|
48
|
+
componentId: "sc-bsemn3-5"
|
|
49
|
+
})(["font-size:14px;font-weight:300;line-height:20px;letter-spacing:0.5px;margin:0;"]);
|
|
50
|
+
const CopyToClipBoardTooltip = _ref => {
|
|
51
|
+
let {
|
|
52
|
+
value,
|
|
53
|
+
buttonStyle,
|
|
54
|
+
onCopy
|
|
55
|
+
} = _ref;
|
|
56
|
+
const [copied, setCopied] = (0, _react.useState)(false);
|
|
57
|
+
const handleCopy = () => {
|
|
58
|
+
setCopied(true);
|
|
59
|
+
if (onCopy) onCopy(value);
|
|
60
|
+
};
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_reactTippy.Tooltip, {
|
|
62
|
+
position: "top",
|
|
63
|
+
title: copied ? 'Copied to clipboard!' : 'Click to copy to clipboard',
|
|
64
|
+
theme: "light",
|
|
65
|
+
arrow: true,
|
|
66
|
+
hideOnClick: false,
|
|
67
|
+
onHidden: () => setCopied(false),
|
|
68
|
+
duration: 200
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_copyToClipboard.CopyToClipboard, {
|
|
70
|
+
text: value,
|
|
71
|
+
onCopy: handleCopy
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_CryptoAddress.CopyToClipboardButton, {
|
|
73
|
+
style: buttonStyle
|
|
74
|
+
})));
|
|
75
|
+
};
|
|
76
|
+
const PaymentDisplay = _ref2 => {
|
|
77
|
+
let {
|
|
78
|
+
amount,
|
|
79
|
+
currency = 'BTC',
|
|
80
|
+
address,
|
|
81
|
+
showQRCode = true,
|
|
82
|
+
showCopyIcons = true,
|
|
83
|
+
showAddress = true,
|
|
84
|
+
qrCodeValue,
|
|
85
|
+
amountTitle = 'Transfer amount',
|
|
86
|
+
addressTitle = 'address',
|
|
87
|
+
addressDescription = '',
|
|
88
|
+
qrCodeSize = 200,
|
|
89
|
+
qrCodeStyle,
|
|
90
|
+
// Style props
|
|
91
|
+
containerStyle,
|
|
92
|
+
codeWrapperStyle,
|
|
93
|
+
amountSectionStyle,
|
|
94
|
+
amountTextStyle,
|
|
95
|
+
amountIconStyle,
|
|
96
|
+
addressTextStyle,
|
|
97
|
+
addressDescriptionStyle,
|
|
98
|
+
addressSectionStyle,
|
|
99
|
+
// Other customization props
|
|
100
|
+
maxWidth,
|
|
101
|
+
className,
|
|
102
|
+
codeWrapperClassName,
|
|
103
|
+
customCurrencyIcon,
|
|
104
|
+
onAmountCopy,
|
|
105
|
+
onAddressCopy,
|
|
106
|
+
copyButtonStyle
|
|
107
|
+
} = _ref2;
|
|
108
|
+
const getCurrencyIcon = currency => {
|
|
109
|
+
if (customCurrencyIcon) return customCurrencyIcon;
|
|
110
|
+
if (!currency) return null;
|
|
111
|
+
if (currency.toLowerCase().includes('btc')) return _bitcoinLogo.default;
|
|
112
|
+
if (currency.toLowerCase().includes('usdc')) return _usdcLogo.default;
|
|
113
|
+
if (currency.toLowerCase().includes('usdq')) return _usdqLogo.default;
|
|
114
|
+
return null;
|
|
115
|
+
};
|
|
116
|
+
const defaultQRCodeStyle = {
|
|
117
|
+
backgroundColor: '#000000',
|
|
118
|
+
padding: 18,
|
|
119
|
+
borderRadius: 8,
|
|
120
|
+
margin: '16px 0'
|
|
121
|
+
};
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, {
|
|
123
|
+
noPadding: true,
|
|
124
|
+
center: true,
|
|
125
|
+
style: containerStyle,
|
|
126
|
+
className: className
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(CodeWrapper, {
|
|
128
|
+
style: codeWrapperStyle,
|
|
129
|
+
maxWidth: maxWidth,
|
|
130
|
+
className: codeWrapperClassName
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_SectionTitle.SectionTitle, null, amountTitle), /*#__PURE__*/_react.default.createElement(AmountSection, {
|
|
132
|
+
style: amountSectionStyle
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(AmountIcon, {
|
|
134
|
+
src: getCurrencyIcon(currency),
|
|
135
|
+
style: amountIconStyle,
|
|
136
|
+
alt: currency
|
|
137
|
+
}), /*#__PURE__*/_react.default.createElement(AmountText, {
|
|
138
|
+
style: amountTextStyle
|
|
139
|
+
}, amount), /*#__PURE__*/_react.default.createElement(AmountText, {
|
|
140
|
+
style: amountTextStyle
|
|
141
|
+
}, " ", currency), showCopyIcons && /*#__PURE__*/_react.default.createElement(CopyToClipBoardTooltip, {
|
|
142
|
+
value: amount.toString(),
|
|
143
|
+
buttonStyle: copyButtonStyle || {
|
|
144
|
+
height: 18,
|
|
145
|
+
width: 18
|
|
146
|
+
},
|
|
147
|
+
onCopy: onAmountCopy
|
|
148
|
+
}))), showQRCode && qrCodeValue && /*#__PURE__*/_react.default.createElement(_QRCode.default, {
|
|
149
|
+
size: qrCodeSize,
|
|
150
|
+
bgColor: "#000000",
|
|
151
|
+
fgColor: "#ffffff",
|
|
152
|
+
style: qrCodeStyle || defaultQRCodeStyle,
|
|
153
|
+
value: qrCodeValue
|
|
154
|
+
}), showAddress && address && /*#__PURE__*/_react.default.createElement("div", {
|
|
155
|
+
style: addressSectionStyle
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_SectionTitle.SectionTitle, null, addressTitle), /*#__PURE__*/_react.default.createElement(_Grid.FlexContainer, {
|
|
157
|
+
style: {
|
|
158
|
+
gap: 16,
|
|
159
|
+
margin: '12px 0'
|
|
160
|
+
}
|
|
161
|
+
}, /*#__PURE__*/_react.default.createElement(AddressText, {
|
|
162
|
+
style: addressTextStyle
|
|
163
|
+
}, address), showCopyIcons && /*#__PURE__*/_react.default.createElement(CopyToClipBoardTooltip, {
|
|
164
|
+
value: address,
|
|
165
|
+
buttonStyle: copyButtonStyle || {
|
|
166
|
+
height: 16,
|
|
167
|
+
width: 16,
|
|
168
|
+
marginTop: 4
|
|
169
|
+
},
|
|
170
|
+
onCopy: onAddressCopy
|
|
171
|
+
})), addressDescription && /*#__PURE__*/_react.default.createElement(AddressDescription, {
|
|
172
|
+
style: addressDescriptionStyle
|
|
173
|
+
}, addressDescription))));
|
|
174
|
+
};
|
|
175
|
+
exports.PaymentDisplay = PaymentDisplay;
|
|
176
|
+
var _default = exports.default = PaymentDisplay;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WithoutQRCode = exports.WithoutCopyIcons = exports.WithCallbacks = exports.USDQPayment = exports.USDCPayment = exports.SmallQRCode = exports.Minimal = exports.LongAddress = exports.LargeQRCode = exports.LargeAmount = exports.CustomWidth = exports.CustomTitles = exports.CustomStyling = exports.CompleteExample = exports.BitcoinPayment = exports.AmountOnly = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _PaymentDisplay = _interopRequireDefault(require("./PaymentDisplay"));
|
|
9
|
+
var _ComponentWrapper = require("../ComponentWrapper/ComponentWrapper.styles");
|
|
10
|
+
var _global = _interopRequireDefault(require("../../styles/global"));
|
|
11
|
+
var _colors = _interopRequireDefault(require("../../styles/colors"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
var _default = exports.default = {
|
|
14
|
+
title: 'Components Library/Payment/PaymentDisplay',
|
|
15
|
+
component: _PaymentDisplay.default,
|
|
16
|
+
argTypes: {
|
|
17
|
+
amount: {
|
|
18
|
+
control: 'text',
|
|
19
|
+
description: 'The payment amount to display'
|
|
20
|
+
},
|
|
21
|
+
currency: {
|
|
22
|
+
control: 'text',
|
|
23
|
+
description: 'Currency code (BTC, USDC, USDQ, etc.)'
|
|
24
|
+
},
|
|
25
|
+
address: {
|
|
26
|
+
control: 'text',
|
|
27
|
+
description: 'Cryptocurrency address to display'
|
|
28
|
+
},
|
|
29
|
+
showQRCode: {
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
description: 'Show QR code section',
|
|
32
|
+
defaultValue: true
|
|
33
|
+
},
|
|
34
|
+
showCopyIcons: {
|
|
35
|
+
control: 'boolean',
|
|
36
|
+
description: 'Show copy to clipboard icons',
|
|
37
|
+
defaultValue: true
|
|
38
|
+
},
|
|
39
|
+
showAddress: {
|
|
40
|
+
control: 'boolean',
|
|
41
|
+
description: 'Show address section',
|
|
42
|
+
defaultValue: true
|
|
43
|
+
},
|
|
44
|
+
qrCodeValue: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Value to encode in QR code'
|
|
47
|
+
},
|
|
48
|
+
amountTitle: {
|
|
49
|
+
control: 'text',
|
|
50
|
+
description: 'Title for the amount section'
|
|
51
|
+
},
|
|
52
|
+
addressTitle: {
|
|
53
|
+
control: 'text',
|
|
54
|
+
description: 'Title for the address section'
|
|
55
|
+
},
|
|
56
|
+
addressDescription: {
|
|
57
|
+
control: 'text',
|
|
58
|
+
description: 'Description text below the address'
|
|
59
|
+
},
|
|
60
|
+
qrCodeSize: {
|
|
61
|
+
control: 'number',
|
|
62
|
+
description: 'Size of the QR code in pixels'
|
|
63
|
+
},
|
|
64
|
+
maxWidth: {
|
|
65
|
+
control: 'text',
|
|
66
|
+
description: 'Maximum width of the code wrapper'
|
|
67
|
+
},
|
|
68
|
+
containerStyle: {
|
|
69
|
+
control: 'object',
|
|
70
|
+
description: 'Style object for the container'
|
|
71
|
+
},
|
|
72
|
+
codeWrapperStyle: {
|
|
73
|
+
control: 'object',
|
|
74
|
+
description: 'Style object for the code wrapper'
|
|
75
|
+
},
|
|
76
|
+
qrCodeStyle: {
|
|
77
|
+
control: 'object',
|
|
78
|
+
description: 'Style object for the QR code'
|
|
79
|
+
},
|
|
80
|
+
customCurrencyIcon: {
|
|
81
|
+
control: false,
|
|
82
|
+
description: 'Custom currency icon (image source)'
|
|
83
|
+
},
|
|
84
|
+
onAmountCopy: {
|
|
85
|
+
action: 'amountCopied',
|
|
86
|
+
description: 'Callback when amount is copied'
|
|
87
|
+
},
|
|
88
|
+
onAddressCopy: {
|
|
89
|
+
action: 'addressCopied',
|
|
90
|
+
description: 'Callback when address is copied'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
decorators: [Story => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_ComponentWrapper.ComponentWrapper, null, /*#__PURE__*/_react.default.createElement(Story, null)))]
|
|
94
|
+
};
|
|
95
|
+
const Template = args => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_global.default, null), /*#__PURE__*/_react.default.createElement(_PaymentDisplay.default, args));
|
|
96
|
+
|
|
97
|
+
// Basic BTC payment
|
|
98
|
+
const BitcoinPayment = exports.BitcoinPayment = Template.bind({});
|
|
99
|
+
BitcoinPayment.args = {
|
|
100
|
+
amount: '0.5',
|
|
101
|
+
currency: 'BTC',
|
|
102
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
103
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
104
|
+
amountTitle: 'Transfer amount',
|
|
105
|
+
addressTitle: 'Bitcoin address',
|
|
106
|
+
addressDescription: 'Send exactly this amount to the address above.'
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// USDC payment
|
|
110
|
+
const USDCPayment = exports.USDCPayment = Template.bind({});
|
|
111
|
+
USDCPayment.args = {
|
|
112
|
+
amount: '1,000.00',
|
|
113
|
+
currency: 'USDC',
|
|
114
|
+
address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
115
|
+
qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
116
|
+
amountTitle: 'Transfer amount',
|
|
117
|
+
addressTitle: 'USDC address',
|
|
118
|
+
addressDescription: 'Send USDC to this Ethereum address.'
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// USDQ payment
|
|
122
|
+
const USDQPayment = exports.USDQPayment = Template.bind({});
|
|
123
|
+
USDQPayment.args = {
|
|
124
|
+
amount: '500.00',
|
|
125
|
+
currency: 'USDQ',
|
|
126
|
+
address: '0x8ba1f109551bD432803012645Hac136c22C1779',
|
|
127
|
+
qrCodeValue: '0x8ba1f109551bD432803012645Hac136c22C1779',
|
|
128
|
+
amountTitle: 'Transfer amount',
|
|
129
|
+
addressTitle: 'USDQ address',
|
|
130
|
+
addressDescription: 'Send USDQ to this address.'
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// Without QR code
|
|
134
|
+
const WithoutQRCode = exports.WithoutQRCode = Template.bind({});
|
|
135
|
+
WithoutQRCode.args = {
|
|
136
|
+
amount: '0.5',
|
|
137
|
+
currency: 'BTC',
|
|
138
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
139
|
+
showQRCode: false,
|
|
140
|
+
amountTitle: 'Transfer amount',
|
|
141
|
+
addressTitle: 'Bitcoin address'
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Without copy icons
|
|
145
|
+
const WithoutCopyIcons = exports.WithoutCopyIcons = Template.bind({});
|
|
146
|
+
WithoutCopyIcons.args = {
|
|
147
|
+
amount: '0.5',
|
|
148
|
+
currency: 'BTC',
|
|
149
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
150
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
151
|
+
showCopyIcons: false,
|
|
152
|
+
amountTitle: 'Transfer amount',
|
|
153
|
+
addressTitle: 'Bitcoin address'
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Without address section
|
|
157
|
+
const AmountOnly = exports.AmountOnly = Template.bind({});
|
|
158
|
+
AmountOnly.args = {
|
|
159
|
+
amount: '0.5',
|
|
160
|
+
currency: 'BTC',
|
|
161
|
+
showAddress: false,
|
|
162
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
163
|
+
amountTitle: 'Transfer amount'
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// Long address
|
|
167
|
+
const LongAddress = exports.LongAddress = Template.bind({});
|
|
168
|
+
LongAddress.args = {
|
|
169
|
+
amount: '1,000.00',
|
|
170
|
+
currency: 'USDC',
|
|
171
|
+
address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
172
|
+
qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
173
|
+
amountTitle: 'Transfer amount',
|
|
174
|
+
addressTitle: 'Ethereum address',
|
|
175
|
+
addressDescription: 'This is a very long address that should wrap properly. Make sure to send the exact amount.'
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
// Large amount
|
|
179
|
+
const LargeAmount = exports.LargeAmount = Template.bind({});
|
|
180
|
+
LargeAmount.args = {
|
|
181
|
+
amount: '1,000,000.00',
|
|
182
|
+
currency: 'USDC',
|
|
183
|
+
address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
184
|
+
qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
185
|
+
amountTitle: 'Transfer amount',
|
|
186
|
+
addressTitle: 'USDC address'
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// Custom width
|
|
190
|
+
const CustomWidth = exports.CustomWidth = Template.bind({});
|
|
191
|
+
CustomWidth.args = {
|
|
192
|
+
amount: '0.5',
|
|
193
|
+
currency: 'BTC',
|
|
194
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
195
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
196
|
+
maxWidth: '800px',
|
|
197
|
+
amountTitle: 'Transfer amount',
|
|
198
|
+
addressTitle: 'Bitcoin address'
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// Custom styling
|
|
202
|
+
const CustomStyling = exports.CustomStyling = Template.bind({});
|
|
203
|
+
CustomStyling.args = {
|
|
204
|
+
amount: '0.5',
|
|
205
|
+
currency: 'BTC',
|
|
206
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
207
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
208
|
+
amountTitle: 'Transfer amount',
|
|
209
|
+
addressTitle: 'Bitcoin address',
|
|
210
|
+
addressDescription: 'Send exactly this amount to the address above.',
|
|
211
|
+
codeWrapperStyle: {
|
|
212
|
+
backgroundColor: _colors.default.veryLightGreen,
|
|
213
|
+
borderColor: _colors.default.freshGreen
|
|
214
|
+
},
|
|
215
|
+
qrCodeStyle: {
|
|
216
|
+
backgroundColor: '#ffffff',
|
|
217
|
+
padding: 20,
|
|
218
|
+
borderRadius: 12
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Small QR code
|
|
223
|
+
const SmallQRCode = exports.SmallQRCode = Template.bind({});
|
|
224
|
+
SmallQRCode.args = {
|
|
225
|
+
amount: '0.5',
|
|
226
|
+
currency: 'BTC',
|
|
227
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
228
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
229
|
+
qrCodeSize: 150,
|
|
230
|
+
amountTitle: 'Transfer amount',
|
|
231
|
+
addressTitle: 'Bitcoin address'
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// Large QR code
|
|
235
|
+
const LargeQRCode = exports.LargeQRCode = Template.bind({});
|
|
236
|
+
LargeQRCode.args = {
|
|
237
|
+
amount: '0.5',
|
|
238
|
+
currency: 'BTC',
|
|
239
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
240
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
241
|
+
qrCodeSize: 300,
|
|
242
|
+
amountTitle: 'Transfer amount',
|
|
243
|
+
addressTitle: 'Bitcoin address'
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// Custom titles
|
|
247
|
+
const CustomTitles = exports.CustomTitles = Template.bind({});
|
|
248
|
+
CustomTitles.args = {
|
|
249
|
+
amount: '0.5',
|
|
250
|
+
currency: 'BTC',
|
|
251
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
252
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
253
|
+
amountTitle: 'Payment Amount',
|
|
254
|
+
addressTitle: 'Recipient Address',
|
|
255
|
+
addressDescription: 'Please send the exact amount shown above to this address.'
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
// Minimal (no description, no QR)
|
|
259
|
+
const Minimal = exports.Minimal = Template.bind({});
|
|
260
|
+
Minimal.args = {
|
|
261
|
+
amount: '0.5',
|
|
262
|
+
currency: 'BTC',
|
|
263
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
264
|
+
showQRCode: false,
|
|
265
|
+
addressDescription: '',
|
|
266
|
+
amountTitle: 'Amount',
|
|
267
|
+
addressTitle: 'Address'
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
// Complete example with all features
|
|
271
|
+
const CompleteExample = exports.CompleteExample = Template.bind({});
|
|
272
|
+
CompleteExample.args = {
|
|
273
|
+
amount: '1,500.00',
|
|
274
|
+
currency: 'USDC',
|
|
275
|
+
address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
276
|
+
qrCodeValue: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
|
|
277
|
+
amountTitle: 'Transfer Amount',
|
|
278
|
+
addressTitle: 'USDC Address',
|
|
279
|
+
addressDescription: 'Send exactly 1,500.00 USDC to the address above. The transaction will be processed automatically once confirmed on the blockchain.',
|
|
280
|
+
qrCodeSize: 250,
|
|
281
|
+
maxWidth: '600px',
|
|
282
|
+
showQRCode: true,
|
|
283
|
+
showCopyIcons: true,
|
|
284
|
+
showAddress: true
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// With callbacks
|
|
288
|
+
const WithCallbacks = exports.WithCallbacks = Template.bind({});
|
|
289
|
+
WithCallbacks.args = {
|
|
290
|
+
amount: '0.5',
|
|
291
|
+
currency: 'BTC',
|
|
292
|
+
address: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
293
|
+
qrCodeValue: 'bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh',
|
|
294
|
+
amountTitle: 'Transfer amount',
|
|
295
|
+
addressTitle: 'Bitcoin address',
|
|
296
|
+
onAmountCopy: value => {
|
|
297
|
+
console.log('Amount copied:', value);
|
|
298
|
+
},
|
|
299
|
+
onAddressCopy: value => {
|
|
300
|
+
console.log('Address copied:', value);
|
|
301
|
+
}
|
|
302
|
+
};
|