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    
@skava/ui / src / components / presets / Checkout / ShippingMethodOption / ShippingMethodOption.tsx
Size: Mime:
import React from 'react'
import { isArray } from 'exotic'
import { toCommonState } from 'src/state'
import { defaultRenderHeader, defaultRenderIcon } from 'molecules/ToggleList'
import { ShippingMethodOptionListProps } from './typings'
import { ToggleList } from './styled'
import { defaultRenderText } from './renderProps'

class ShippingMethodOption extends React.PureComponent<
  ShippingMethodOptionListProps
  > {
  static defaultProps = {
    className: '',
    title: 'Shipping method',
    //
    renderHeader: defaultRenderHeader,
    renderIcon: defaultRenderIcon,
    renderText: defaultRenderText,
  }
  render() {
    const { list } = this.props
    const shippingMethodOptionList = isArray(list) && list.map(toCommonState)
    return <ToggleList {...this.props} list={shippingMethodOptionList} />
  }
}

export { ShippingMethodOption }
export default ShippingMethodOption