aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/framework/src/components/material-ui
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-02-03 16:10:57 +0100
committerDan Timoney <dtimoney@att.com>2021-02-05 22:58:04 +0000
commit0f28ecccb0dbd7c2f39e2c4676e17ca0c38464a2 (patch)
treeae4ac3eac568a78eb5539d0bbc0bbd912d071e4a /sdnr/wt/odlux/framework/src/components/material-ui
parent95cae7ce9aa09198bd46eee556da468a57657017 (diff)
Migrate odlux
Migrate odlux to Aluminium Issue-ID: CCSDK-3136 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: I3200a809a31e87021c95fe103a9c95e03011f503 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/odlux/framework/src/components/material-ui')
-rw-r--r--sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx b/sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx
index 8c4b740a0..8828ac3fc 100644
--- a/sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx
+++ b/sdnr/wt/odlux/framework/src/components/material-ui/listItemLink.tsx
@@ -36,11 +36,14 @@ export interface IListItemLinkProps extends WithStyles<typeof styles> {
secondary?: React.ComponentType;
to: string;
exact?: boolean;
+ external?: boolean;
}
export const ListItemLink = withStyles(styles)((props: IListItemLinkProps) => {
- const { icon, primary: Primary, secondary: Secondary, classes, to, exact = false } = props;
- const renderLink = (itemProps: any): JSX.Element => (<NavLink exact={ exact } to={ to } activeClassName={ classes.active } { ...itemProps } />);
+ const { icon, primary: Primary, secondary: Secondary, classes, to, exact = false, external=false } = props;
+ const renderLink = (itemProps: any): JSX.Element => (
+ props.external ? <a target="_blank" href={to} { ...itemProps }></a> :
+ <NavLink exact={ exact } to={ to } activeClassName={ classes.active } { ...itemProps } />);
const ariaLabel = typeof Primary === 'string' ? "link-to-"+Primary.toLowerCase().replace(/\s/g, "-") : "link-to-"+Primary.displayName?.toLowerCase();
return (