@weareconceptstudio/account 0.2.9 → 0.3.0
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.
|
@@ -6,10 +6,13 @@ import { FormBuilder } from '@weareconceptstudio/form';
|
|
|
6
6
|
import ShippingBillingFormStyle from './style';
|
|
7
7
|
const ShippingBillingForm = Memo(({ firstStepFormRef, title, className }) => {
|
|
8
8
|
const { createAddress, formFields } = useAddressContext();
|
|
9
|
+
const onFormSubmit = (values) => {
|
|
10
|
+
return createAddress({ data: values });
|
|
11
|
+
};
|
|
9
12
|
return (React.createElement(ShippingBillingFormStyle, { className: className || '' },
|
|
10
13
|
React.createElement(Text, { text: title, className: `account-p account-p2 account-font-bold account-primary-color1 title` }),
|
|
11
14
|
React.createElement(FormBuilder, { formOptions: {
|
|
12
15
|
ref: firstStepFormRef,
|
|
13
|
-
}, onSubmit:
|
|
16
|
+
}, onSubmit: onFormSubmit, fields: formFields, className: 'form-wrapper' })));
|
|
14
17
|
});
|
|
15
18
|
export default ShippingBillingForm;
|