Repository URL to install this package:
|
Version:
0.14.1 ▾
|
ui-component-library
/
src
/
components
/
presets
/
Checkout
/
ShippingAddressOption
/
ShippingAddressOption.tsx
|
|---|
import React from 'react'
import { isArray } from 'exotic'
import { toCommonState } from 'src/state'
import { ShippingAddressOptionListProps } from './typings'
import { ShippingAddressOptionPlaceholder } from './styled'
import { defaultRenderIcon, defaultRenderText } from './renderProps'
class ShippingAddressOption extends React.PureComponent<ShippingAddressOptionListProps> {
static defaultProps = {
className: '',
// renderProps
renderIcon: defaultRenderIcon,
renderText: defaultRenderText,
}
render() {
const { list } = this.props
const shippingAddressOptionList = isArray(list) && list.map(toCommonState)
return <ShippingAddressOptionPlaceholder {...this.props} list={shippingAddressOptionList} />
}
}
export { ShippingAddressOption }
export default ShippingAddressOption