@commercelayer/react-components 2.49.7 → 2.49.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});const tslib_1=require("tslib");const jsx_runtime_1=require("react/jsx-runtime");const react_1=require("react");const ShippingMethodChildrenContext_1=(0,tslib_1.__importDefault)(require("../context/ShippingMethodChildrenContext"));const Parent_1=(0,tslib_1.__importDefault)(require("./utils/Parent"));const components_1=(0,tslib_1.__importDefault)(require("../config/components"));const propTypes=components_1.default.ShippingMethodName.propTypes;const displayName=components_1.default.ShippingMethodName.displayName;const ShippingMethodName=e=>{const{shippingMethod:t,deliveryLeadTimeForShipment:i,shipmentId:n}=(0,react_1.useContext)(ShippingMethodChildrenContext_1.default);const o=`shipment-${n}-${t===null||t===void 0?void 0:t.id}`||"";const s=t===null||t===void 0?void 0:t["name"];const p=Object.assign({shippingMethod:t,deliveryLeadTimeForShipment:i,label:s},e);return e.children?(0,jsx_runtime_1.jsx)(Parent_1.default,Object.assign({},p,{children:e.children}),void 0):(0,jsx_runtime_1.jsx)("label",Object.assign({htmlFor:o},e,{children:s}),void 0)};ShippingMethodName.propTypes=propTypes;ShippingMethodName.displayName=displayName;exports.default=ShippingMethodName;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});const tslib_1=require("tslib");const jsx_runtime_1=require("react/jsx-runtime");const react_1=require("react");const ShippingMethodChildrenContext_1=(0,tslib_1.__importDefault)(require("../context/ShippingMethodChildrenContext"));const Parent_1=(0,tslib_1.__importDefault)(require("./utils/Parent"));const components_1=(0,tslib_1.__importDefault)(require("../config/components"));const propTypes=components_1.default.ShippingMethodName.propTypes;const displayName=components_1.default.ShippingMethodName.displayName;const ShippingMethodName=e=>{const{shippingMethod:t,deliveryLeadTimeForShipment:i,shipmentId:n}=(0,react_1.useContext)(ShippingMethodChildrenContext_1.default);const o=`shipment-${n}-${t===null||t===void 0?void 0:t.id}`||"";const s=t===null||t===void 0?void 0:t["name"];const p=Object.assign({shippingMethod:t,deliveryLeadTimeForShipment:i,label:s,htmlFor:o},e);return e.children?(0,jsx_runtime_1.jsx)(Parent_1.default,Object.assign({},p,{children:e.children}),void 0):(0,jsx_runtime_1.jsx)("label",Object.assign({htmlFor:o},e,{children:s}),void 0)};ShippingMethodName.propTypes=propTypes;ShippingMethodName.displayName=displayName;exports.default=ShippingMethodName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import ShippingMethodChildrenContext from"../context/ShippingMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.ShippingMethodName.propTypes;const displayName=components.ShippingMethodName.displayName;const ShippingMethodName=e=>{const{shippingMethod:i,deliveryLeadTimeForShipment:o,shipmentId:t}=useContext(ShippingMethodChildrenContext);const n=`shipment-${t}-${i===null||i===void 0?void 0:i.id}`||"";const p=i===null||i===void 0?void 0:i["name"];const s=Object.assign({shippingMethod:i,deliveryLeadTimeForShipment:o,label:p},e);return e.children?_jsx(Parent,Object.assign({},s,{children:e.children}),void 0):_jsx("label",Object.assign({htmlFor:n},e,{children:p}),void 0)};ShippingMethodName.propTypes=propTypes;ShippingMethodName.displayName=displayName;export default ShippingMethodName;
|
|
1
|
+
import{jsx as _jsx}from"react/jsx-runtime";import{useContext}from"react";import ShippingMethodChildrenContext from"../context/ShippingMethodChildrenContext";import Parent from"./utils/Parent";import components from"../config/components";const propTypes=components.ShippingMethodName.propTypes;const displayName=components.ShippingMethodName.displayName;const ShippingMethodName=e=>{const{shippingMethod:i,deliveryLeadTimeForShipment:o,shipmentId:t}=useContext(ShippingMethodChildrenContext);const n=`shipment-${t}-${i===null||i===void 0?void 0:i.id}`||"";const p=i===null||i===void 0?void 0:i["name"];const s=Object.assign({shippingMethod:i,deliveryLeadTimeForShipment:o,label:p,htmlFor:n},e);return e.children?_jsx(Parent,Object.assign({},s,{children:e.children}),void 0):_jsx("label",Object.assign({htmlFor:n},e,{children:p}),void 0)};ShippingMethodName.propTypes=propTypes;ShippingMethodName.displayName=displayName;export default ShippingMethodName;
|