Repository URL to install this package:
|
Version:
2.2.6 ▾
|
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