Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

PullRequestEditButton.tsx

25 lines766 Bytes

1import { PencilIcon } from "lucide-react";
2import type { ComponentProps } from "react";
3​
4import { cn } from "../../lib/utils";
5import { Button } from "../ui/button";
6​
7export function PullRequestEditButton({
8 className,
9 ...props
10}: Omit<ComponentProps<typeof Button>, "children" | "render" | "size" | "variant"> & {
11 "aria-label": string;
12}) {
13 return (
14 <span
15 className={cn(
16 "flex shrink-0 opacity-0 transition-opacity pointer-coarse:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 focus-within:opacity-100 motion-reduce:transition-none",
17 className,
18 )}
19 >
20 <Button {...props} size="icon-xs" variant="ghost-muted">
21 <PencilIcon aria-hidden className="size-3" />
22 </Button>
23 </span>
24 );