@vtex/pickup-points-modal v1.1.15
Pickup Points Modal
A React component that renders VTEX's pickup points modal
Setup
$ npm install @vtex/pickup-points-modalAPI
Base Component
Base Component
PickupPointsModal
This component renders the modal with a list of pickup points and a map with markers
Props
closePickupPointsModal: Callback function to be called when PickupPointsModal is closedchangeActiveSLAOption: Callback function to be called when a pickup is selectedchangeActivePickupDetails: Callback function to be called when PickupPointDetails state is changedgoogleMapsKey: The Google Maps API Keyitems: Items array fromorderFormto get the products informationisPickupDetailsActive: (default:false) If the PickupPointDetails is active and should be renderedlogisticsInfo: LogisticsInfo array fromorderFormto get sla informationonAddressChange: Callback function to be called when a the search field has changedpickupOptions: Array of pickup points (SLAs of typepickup-in-point)searchAddress: The current address used for the search input in the shape ofAddressShapeWithValidationselectedPickupPoint: Current selected SLA of typepickup-in-pointrules: The selected country rules fromAddressFormsellerId: The Id of the seller when the list of pickups is filtered by sellerstorePreferencesData: Object fromorderFormto get currency preferences from store
PickupPointsModal.propTypes = {
closePickupPointsModal: PropTypes.func.isRequired,
changeActivePickupDetails: PropTypes.func.isRequired,
changeActiveSLAOption: PropTypes.func.isRequired,
googleMapsKey: PropTypes.string.isRequired,
items: PropTypes.array.isRequired,
isPickupDetailsActive: PropTypes.bool,
logisticsInfo: PropTypes.array.isRequired
onAddressChange: PropTypes.func.isRequired,
pickupOptions: PropTypes.array.isRequired,
searchAddress: AddressShapeWithValidation,
selectedPickupPoint: PropTypes.object,
rules: PropTypes.object,
sellerId: PropTypes.string,
storePreferencesData: PropTypes.object.isRequired,
};Example
<PickupPointsModal
closePickupPointsModal={this.closePickupModal}
changeActivePickupDetails={this.changeActivePickupDetails}
changeActiveSLAOption={this.changeActiveSLAOption}
googleMapsKey={googleMapsKey}
intl={intl}
items={items}
isPickupDetailsActive={isPickupDetailsActive}
logisticsInfo={logisticsInfo}
onAddressChange={this.handleAddressChange}
pickupOptions={pickupOptions}
searchAddress={searchAddress}
selectedPickupPoint={selectedPickupPoint}
selectedRules={selectedRules}
sellerId={sellerId}
storePreferencesData={storePreferencesData}
/>7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago