@riosst100/pwa-marketplace 1.1.8 → 1.1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riosst100/pwa-marketplace",
|
|
3
3
|
"author": "riosst100@gmail.com",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.9",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"pwa-studio": {
|
|
7
7
|
"targets": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"axios": "^1.6.5"
|
|
12
|
+
"axios": "^1.6.5",
|
|
13
|
+
"react-phone-number-input": "^3.3.9"
|
|
13
14
|
},
|
|
14
15
|
"license": "MIT",
|
|
15
16
|
"private": false
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
1
|
+
import React, { Fragment, useState } from 'react';
|
|
2
2
|
import { node, shape, string } from 'prop-types';
|
|
3
3
|
import useFieldState from '@magento/peregrine/lib/hooks/hook-wrappers/useInformedFieldStateWrapper';
|
|
4
4
|
|
|
5
5
|
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
6
|
import { FieldIcons, Message } from '@magento/venia-ui/lib/components/Field';
|
|
7
7
|
import defaultClasses from './phoneInput.module.css';
|
|
8
|
+
import {PhoneInput as ReactPhoneInput} from 'react-phone-number-input'
|
|
8
9
|
|
|
9
10
|
const PhoneInput = props => {
|
|
10
11
|
const {
|
|
@@ -21,12 +22,12 @@ const PhoneInput = props => {
|
|
|
21
22
|
var inputClass =
|
|
22
23
|
fieldState.error || regionError ? classes.input_error : classes.input;
|
|
23
24
|
|
|
24
|
-
const [value, setValue] = useState(
|
|
25
|
+
const [value, setValue] = useState('');
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
28
|
<Fragment>
|
|
28
29
|
<FieldIcons after={after} before={before}>
|
|
29
|
-
<
|
|
30
|
+
<ReactPhoneInput
|
|
30
31
|
international
|
|
31
32
|
countryCallingCodeEditable={false}
|
|
32
33
|
defaultCountry="ID"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.input {
|
|
2
|
-
composes: input from '
|
|
2
|
+
composes: input from '@magento/venia-ui/lib/components/Field/field.module.css';
|
|
3
3
|
|
|
4
4
|
composes: disabled_text-subtle from global;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.input_error {
|
|
8
|
-
composes: input from '
|
|
8
|
+
composes: input from '@magento/venia-ui/lib/components/Field/field.module.css';
|
|
9
9
|
|
|
10
10
|
composes: border-error from global;
|
|
11
11
|
}
|