Repository URL to install this package:
Version:
0.9.6 ▾
|
import React from 'react'
import { SectionLinkList } from 'presets/SectionLinkList'
import { LinkList } from './fixtures'
import { MultipleLinkListWrapper } from './styled'
import { MultipleLinkListProps } from './typings'
function renderItem(props: any) {
return <SectionLinkList {...props} />
}
class MultipleLinkList extends React.PureComponent<MultipleLinkListProps> {
static defaultProps = {
list: LinkList,
}
render() {
const { list, className } = this.props
const children = list.map((item, index) => renderItem(item))
return (
<MultipleLinkListWrapper className={className} length={list.length}>
{children}
</MultipleLinkListWrapper>
)
}
}
export { MultipleLinkList }
export default MultipleLinkList