Repository URL to install this package:
Version:
0.9.6 ▾
|
import React from 'react'
import { SectionLinkListProps } from './typings'
import {
SectionLinkListData as defaultData,
SectionLinkListTitle as defaultTitle,
} from './fixtures'
import SectionList from 'presets/SectionList'
import { StyledLink } from './styled'
/**
* replacing the text as link
*/
const renderItemAsLink = (item: any) => {
return (
<StyledLink key={item} to={item.href}>
{item.label}
</StyledLink>
)
}
class SectionLinkList extends React.PureComponent<SectionLinkListProps> {
static defaultProps = {
className: '',
list: defaultData,
title: defaultTitle,
renderItem: renderItemAsLink,
}
render() {
return <SectionList {...this.props} />
}
}
export { SectionLinkList }
export default SectionLinkList