Skip to content

Commit

Permalink
added double-click to open
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviel-Resnick committed Nov 28, 2023
1 parent 920599e commit dbe9ab7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/renderer/src/components/SlateCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ export default function SlateCard(
: "bg-cardDefault";

const ref = createRef<HTMLElement>();

const handleDoubleClick = () => {
if (testMode === "doubleclick") {
window.files.openExternally(filePath);
}
};

return (
<Draggable draggableId={id} index={index}>
{(provided, snapshot) => (
<div
onDoubleClick={handleDoubleClick}
ref={provided.innerRef}
className={`rounded p-2 mb-2 flex items-center justify-between z-30 ${bgColorClass} ${
snapshot.isDragging ? "opacity-75" : "opacity-100"
Expand Down

1 comment on commit dbe9ab7

@Aviel-Resnick
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closes #34

Please sign in to comment.