A React component that renders shippingEstimate property from Checkout's OrderForm
Through vtex.io:
Add the following dependency to your manifest.json
dependencies:
"vtex.shipping-estimate-translator": "1.x"
import TranslateEstimate from 'vtex.shipping-estimate-translator/TranslateEstimate'
<TranslateEstimate shippingEstimate="0bd" />
// Same day
<TranslateEstimate shippingEstimate="1m" />
// In 1 minute
<TranslateEstimate shippingEstimate="0m" isPickup />
// Ready for pickup
<TranslateEstimate shippingEstimate="3m" lowerCase />
// in 3 minutes
- shippingEstimate | Type
string
| String to be translated - isPickup | Type
boolean
| Condition to translate estimate for pickup point - lowerCase | Type
boolean
| Condition to convert translated content to lowerCase
- Translated value | Type
string
yarn test