Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import React from 'react'
import { ShippingAddress } from 'src/forms/views'
import { ShippingMethodOption, DeliveryInstruction } from 'presets/Checkout'
import { ProductItem } from 'presets/ProductPieces'
import { MultipleShippingProps } from './typings'

function defaultRenderProductItem(props: MultipleShippingProps) {
  const { productItem } = props
  return <ProductItem item={productItem} />
}

function defaultRenderShippingAddress(props: MultipleShippingProps) {
  return <ShippingAddress />
}

function defaultRenderShippingMethod(props: MultipleShippingProps) {
  const { shippingMethodOptionList, handleShippingMethodChange } = props
  return <ShippingMethodOption list={shippingMethodOptionList} onChange={handleShippingMethodChange} />
}

function defaultRenderDeliveryInstruction(props: MultipleShippingProps) {
  const {
    deliveryInstructionConfig,
    handleAddDeliveryInstruction,
    handleRemoveDeliveryInstruction,
  } = props
  return (
    <DeliveryInstruction
      {...deliveryInstructionConfig}
      onSubmit={handleAddDeliveryInstruction}
      onCancel={handleRemoveDeliveryInstruction}
    />
  )
}

export {
  defaultRenderProductItem,
  defaultRenderShippingAddress,
  defaultRenderShippingMethod,
  defaultRenderDeliveryInstruction,
}