@zappie/checkout-fields
The behaviour of a checkout's fields, above useCheckoutFlow from @zappie/foundations/checkout: the address search and its map, the contact details dialog, the schedule's days, the delivery area search and the When section. You bring the markup and the styles.
npm install @zappie/checkout-fields @zappie/foundations @zappie/sdk react
Use it
import {
DeliveryAddressMap,
useAddressPicker,
useAddressSuggestions,
} from "@zappie/checkout-fields";
const state = useAddressPicker(places, branch.id, onPick);
const { suggestions, searching } = useAddressSuggestions(
state.search,
state.query,
{
enabled: !state.selected,
},
);
DeliveryAddressMap shows the live delivery map when the store has a Maps key, loaded in its own chunk, and the static map of the address otherwise.