X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/876e5e2f31a218255845977489ea70aacc0211cd..318fb9f2f730f376bbb4fe7afec567b7ca80aabe:/src/views-components/context-menu/actions/favorite-action.tsx

diff --git a/src/views-components/context-menu/actions/favorite-action.tsx b/src/views-components/context-menu/actions/favorite-action.tsx
index 21f037d9..1e817ba3 100644
--- a/src/views-components/context-menu/actions/favorite-action.tsx
+++ b/src/views-components/context-menu/actions/favorite-action.tsx
@@ -3,25 +3,28 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { ListItemIcon, ListItemText } from "@material-ui/core";
+import { ListItemIcon, ListItemText, ListItem } from "@material-ui/core";
 import { AddFavoriteIcon, RemoveFavoriteIcon } from "~/components/icon/icon";
 import { connect } from "react-redux";
 import { RootState } from "~/store/store";
 
-const mapStateToProps = (state: RootState) => ({
-    isFavorite: state.contextMenu.resource !== undefined && state.favorites[state.contextMenu.resource.uuid] === true
+const mapStateToProps = (state: RootState, props: { onClick: () => {} }) => ({
+    isFavorite: state.contextMenu.resource !== undefined && state.favorites[state.contextMenu.resource.uuid] === true,
+    onClick: props.onClick
 });
 
-export const ToggleFavoriteAction = connect(mapStateToProps)((props: { isFavorite: boolean }) =>
-    <>
+export const ToggleFavoriteAction = connect(mapStateToProps)((props: { isFavorite: boolean, onClick: () => void }) =>
+    <ListItem
+        button
+        onClick={props.onClick}>
         <ListItemIcon>
             {props.isFavorite
                 ? <RemoveFavoriteIcon />
                 : <AddFavoriteIcon />}
         </ListItemIcon>
-        <ListItemText>
+        <ListItemText style={{ textDecoration: 'none' }}>
             {props.isFavorite
                 ? <>Remove from favorites</>
                 : <>Add to favorites</>}
         </ListItemText>
-    </>);
+    </ListItem >);
