-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update link implementation and usages in tables app-wide (#787)
- Updated link component to optionally use button classes - Fixed link alignment in tables (Agents, Workflows) - Updated webhooks actions to use dropdown instead of popover Signed-off-by: Ryan Hopper-Lowe <ryan@acorn.io>
- Loading branch information
1 parent
b13c3a8
commit 9e69b19
Showing
11 changed files
with
164 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { EllipsisIcon } from "lucide-react"; | ||
import { $path } from "remix-routes"; | ||
|
||
import { Webhook } from "~/lib/model/webhooks"; | ||
|
||
import { Button } from "~/components/ui/button"; | ||
import { | ||
DropdownMenu, | ||
DropdownMenuContent, | ||
DropdownMenuGroup, | ||
DropdownMenuItem, | ||
DropdownMenuTrigger, | ||
} from "~/components/ui/dropdown-menu"; | ||
import { Link } from "~/components/ui/link"; | ||
import { DeleteWebhook } from "~/components/webhooks/DeleteWebhook"; | ||
|
||
export function WebhookActions({ webhook }: { webhook: Webhook }) { | ||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button | ||
variant="ghost" | ||
size="icon" | ||
onClick={(e) => e.stopPropagation()} | ||
> | ||
<EllipsisIcon /> | ||
</Button> | ||
</DropdownMenuTrigger> | ||
|
||
<DropdownMenuContent | ||
className="w-48 p-2 flex flex-col gap-1" | ||
side="bottom" | ||
align="end" | ||
onClick={(e) => e.stopPropagation()} | ||
> | ||
<DropdownMenuGroup> | ||
<Link | ||
to={$path("/webhooks/:webhook", { | ||
webhook: webhook.id, | ||
})} | ||
as="div" | ||
> | ||
<DropdownMenuItem>Edit</DropdownMenuItem> | ||
</Link> | ||
|
||
<DeleteWebhook id={webhook.id}> | ||
<DropdownMenuItem onSelect={(e) => e.preventDefault()}> | ||
Delete | ||
</DropdownMenuItem> | ||
</DeleteWebhook> | ||
</DropdownMenuGroup> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.