Skip to content

Commit

Permalink
feat: #96 create menu for search
Browse files Browse the repository at this point in the history
  • Loading branch information
André Gava committed Dec 2, 2021
1 parent 6613de8 commit b9bceb2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/app/components/SearchMenu/MenuItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { SearchSource } from '..';
import RoundedButton from '../../RoundedButton';

interface MenuItemProps {
//mouseInterraction(e: React.MouseEvent, param: any): void;
keyPress(e: React.KeyboardEvent): void;
selectedItem: number;
order: number;
Expand All @@ -13,7 +12,6 @@ interface MenuItemProps {

const MenuItem: React.FC<MenuItemProps> = ({
selectedItem,
//mouseInterraction,
keyPress,
order,
item,
Expand All @@ -24,9 +22,8 @@ const MenuItem: React.FC<MenuItemProps> = ({
<span
tabIndex={order - 1}
className={selectedItem === order - 1 ? 'selected' : ''}
onClick={(e: React.MouseEvent) => item.handler.onClick(e)}
onClick={(e: React.MouseEvent) => item.handler.onClick(e)}
onKeyDown={keyPress}
// onKeyDown={e => item.handler.onPress(e, item)}
>
{<item.icon size={20} />}
{item.label}
Expand All @@ -35,9 +32,7 @@ const MenuItem: React.FC<MenuItemProps> = ({
className={
selectedItem === order ? 'secondary selected' : 'secondary'
}
//onClick={item.action.onClick}
//onKeyDown={item.action.onPress}
onClick={(e: React.MouseEvent) => item.action.onClick(e)}
onClick={(e: React.MouseEvent) => item.action.onClick(e)}
onKeyDown={keyPress}
tabIndex={order}
icon={FiPlus}
Expand Down

0 comments on commit b9bceb2

Please sign in to comment.