Added prop for openInNewTab in ListItem for Button links
• Added: - prop for openInNewTab in ListItem for Button links
This commit is contained in:
parent
2fff6b3046
commit
b636f36871
|
@ -29,6 +29,7 @@ class ListItem extends React.PureComponent {
|
||||||
isHidden,
|
isHidden,
|
||||||
subtitle,
|
subtitle,
|
||||||
isActive,
|
isActive,
|
||||||
|
openInNewTab,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
if (!title) {
|
if (!title) {
|
||||||
|
@ -98,6 +99,7 @@ class ListItem extends React.PureComponent {
|
||||||
href={href}
|
href={href}
|
||||||
onClick={!!onClick ? this.handleOnClick : undefined}
|
onClick={!!onClick ? this.handleOnClick : undefined}
|
||||||
className={containerClasses}
|
className={containerClasses}
|
||||||
|
target={openInNewTab ? '_blank' : undefined}
|
||||||
noClasses
|
noClasses
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -173,6 +175,7 @@ ListItem.propTypes = {
|
||||||
'large',
|
'large',
|
||||||
]),
|
]),
|
||||||
hideArrow: PropTypes.bool,
|
hideArrow: PropTypes.bool,
|
||||||
|
openInNewTab: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ListItem
|
export default ListItem
|
Loading…
Reference in New Issue