@shopgate/engage
Version:
Shopgate's ENGAGE library.
4 lines • 1.48 kB
JavaScript
import React,{forwardRef}from'react';import{SHOP_SETTING_REGISTRATION_MODE_SIMPLE}from'@shopgate/engage/core';import RegistrationFormBase from"./RegistrationFormBase";import RegistrationFormBilling from"./RegistrationFormBilling";import RegistrationFormShipping from"./RegistrationFormShipping";import RegistrationFormActions from"./RegistrationFormActions";import RegistrationFormExtra from"./RegistrationFormExtra";import RegistrationFormToggle from"./RegistrationFormToggle";import{container,containerItem}from"./RegistrationContent.style";import{useRegistration}from"../../hooks";/**
* The Registration component.
* @returns {JSX}
*/var Registration=forwardRef(function(_,ref){var _useRegistration=useRegistration(),registrationMode=_useRegistration.registrationMode;var renderSingleColumn=registrationMode===SHOP_SETTING_REGISTRATION_MODE_SIMPLE;return React.createElement(React.Fragment,null,React.createElement("div",{className:container,ref:ref},React.createElement("div",{className:containerItem},!renderSingleColumn&&React.createElement(RegistrationFormBase,null)),React.createElement("div",{className:containerItem},renderSingleColumn&&React.createElement(RegistrationFormBase,null),React.createElement(RegistrationFormBilling,null),React.createElement(RegistrationFormToggle,null),React.createElement(RegistrationFormShipping,null),React.createElement(RegistrationFormExtra,null))),React.createElement(RegistrationFormActions,null));});export default Registration;