X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0a6a8ab679e84f99eedc17aec46a310ef86172c6..77f285190a3ae77a1075b249ca964b1afeed7ca2:/src/views-components/context-menu/actions/favorite-action.tsx?ds=sidebyside

diff --git a/src/views-components/context-menu/actions/favorite-action.tsx b/src/views-components/context-menu/actions/favorite-action.tsx
index 55fe8cfd..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 { AddFavoriteIcon, RemoveFavoriteIcon } from "../../../components/icon/icon";
+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";
+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 >);
