Skip to content

Commit

Permalink
feat: add file tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Sep 1, 2024
1 parent a17073a commit a50a4d9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/workspace/new-file.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ import {
import { useState } from "react";
import { FilePlus } from "lucide-react";
import { NewFileForm } from "./new-file-form";
import { Tooltip } from "../tooltip";

export default function NewFile() {
const [isOpen, setIsOpen] = useState(false);

return (
<Dialog open={isOpen} onOpenChange={(open) => setIsOpen(open)}>
<DialogTrigger asChild>
<Button variant="ghost" size="icon" onClick={() => setIsOpen(true)}>
<FilePlus className="h-4 w-4" />
</Button>
<Tooltip text="Add file...">
<Button variant="ghost" size="icon" onClick={() => setIsOpen(true)}>
<FilePlus className="h-4 w-4" />
</Button>
</Tooltip>
</DialogTrigger>
<DialogContent>
<DialogHeader>
Expand Down

0 comments on commit a50a4d9

Please sign in to comment.