Added prop for openInNewTab in ListItem for Button links

• Added:
- prop for openInNewTab in ListItem for Button links
This commit is contained in:
Developer 2021-02-11 00:21:44 -05:00
parent 2fff6b3046
commit b636f36871
1 changed files with 3 additions and 0 deletions

View File

@ -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