@betterstore/react
Version:
35 lines (34 loc) • 1.17 kB
TypeScript
import { GetCheckoutResponse, GetShippingRatesResponse } from '@betterstore/sdk';
import { ShipmentsFormData } from '../../checkout-schema';
export type ShippingRate = GetShippingRatesResponse["rates"][number];
interface ShipmentsFormProps {
form: {
initialData?: ShipmentsFormData;
onSubmit: (data: ShipmentsFormData) => void;
onBack: () => void;
};
shipping: {
rates: GetShippingRatesResponse | undefined;
shipments: GetCheckoutResponse["shipments"];
};
customer: {
email: string;
address: string;
countryCode?: string;
};
currency: {
code: string;
exchangeRate: number;
};
locale?: string;
onShippingDataChange?: (shipmentId: string, data: {
rateId: string;
carrierId?: string;
priceInCents: number;
displayName: string;
pickupPointId: string;
pickupPointDisplayName: string;
}) => void;
}
export default function ShipmentsShippingMethodForm({ form: formProps, shipping, customer, currency, locale, onShippingDataChange, }: ShipmentsFormProps): import("react/jsx-runtime").JSX.Element;
export {};