@seamlessdocs/payment-modals 1.0.48 → 1.0.49
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamlessdocs/payment-modals",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/payment-modals.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"react-dom": "^16.10.1",
|
|
54
54
|
"react-inlinesvg": "^1.1.7",
|
|
55
55
|
"react-select": "^3.1.0",
|
|
56
|
-
"react-
|
|
56
|
+
"react-tippy": "^1.4.0"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -21,20 +21,11 @@
|
|
|
21
21
|
line-height: 13px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.validationIcon {
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 0;
|
|
27
|
-
right: 0;
|
|
28
|
-
|
|
29
|
-
margin: 8px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
24
|
.invalidField {
|
|
33
25
|
background: #fbf3f2;
|
|
34
26
|
}
|
|
35
27
|
|
|
36
|
-
.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
text-align: center;
|
|
28
|
+
.fieldHeader {
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: space-between;
|
|
40
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
4
|
+
import { Tooltip } from 'react-tippy';
|
|
5
5
|
|
|
6
6
|
import { Field } from 'formik';
|
|
7
7
|
|
|
@@ -10,6 +10,8 @@ import validIcon from '../../../../assets/img/valid-icon.svg';
|
|
|
10
10
|
|
|
11
11
|
import styles from './FieldContainer.module.css';
|
|
12
12
|
|
|
13
|
+
import 'react-tippy/dist/tippy.css';
|
|
14
|
+
|
|
13
15
|
const FieldContainer = ({ name, label, children }) => {
|
|
14
16
|
return (
|
|
15
17
|
<Field name={name}>
|
|
@@ -19,30 +21,17 @@ const FieldContainer = ({ name, label, children }) => {
|
|
|
19
21
|
[styles.invalidField]: meta.touched && meta.error
|
|
20
22
|
})}
|
|
21
23
|
>
|
|
22
|
-
<div className={styles.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
className={styles.tooltip}
|
|
34
|
-
id={name}
|
|
35
|
-
place="top"
|
|
36
|
-
type="dark"
|
|
37
|
-
effect="solid"
|
|
38
|
-
>
|
|
39
|
-
<span>{meta.error}</span>
|
|
40
|
-
</ReactTooltip>
|
|
41
|
-
</>
|
|
42
|
-
)}
|
|
43
|
-
{meta.touched && !meta.error && (
|
|
44
|
-
<img className={styles.validationIcon} src={validIcon} alt="valid" />
|
|
45
|
-
)}
|
|
24
|
+
<div className={styles.fieldHeader}>
|
|
25
|
+
<div className={styles.fieldName}>{label}</div>
|
|
26
|
+
{meta.touched && meta.error && (
|
|
27
|
+
<Tooltip title={meta.error} arrow>
|
|
28
|
+
<img src={errorIcon} alt="error" />
|
|
29
|
+
</Tooltip>
|
|
30
|
+
)}
|
|
31
|
+
{meta.touched && !meta.error && (
|
|
32
|
+
<img className={styles.validationIcon} src={validIcon} alt="valid" />
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
46
35
|
|
|
47
36
|
{children(field)}
|
|
48
37
|
</div>
|