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    
ui-component-library / stories / presets / Checkout / GuestUser / MultipleShipping.story.tsx
Size: Mime:
import React from 'react'
import { storiesOf } from '@storybook/react'
import { MultipleShipping } from 'presets/Checkout/GuestUser'
import {
  productItem,
  shippingMethodOptionList,
  deliveryInstructionConfig,
} from '../fixture'

const handleShippingMethodChange = (event: Event, item) => {
  console.log('[Handler] handleShippingMethodChange: ', item.value)
}

const handleShippingAddressChange = (event: Event, item) => {
  console.log('[Handler] handleShippingAddressChange', item.value)
}

const handleAddDeliveryInstruction = (args: Object) => {
  console.log('[Handler] handleAddDeliveryInstruction', args.toSerialized())
}

const handleRemoveDeliveryInstruction = (args: Object) => {
  console.log('[Handler] handleRemoveDeliveryInstruction', args.toSerialized())
}

const attributes = {
  shippingMethodOptionList,
  deliveryInstructionConfig,
  productItem,
  handleShippingMethodChange,
  handleShippingAddressChange,
  handleAddDeliveryInstruction,
  handleRemoveDeliveryInstruction,
}
storiesOf('presets/Checkout/GuestUser', module).add('MultipleShipping', () => (
  <MultipleShipping {...attributes} />
))