Skip to documentation
Design system / Sources & standards
Current repository source
inlineEditTrigger.tsx
src/components/ui/inlineEditTrigger.tsx
This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.
"use client";
import type { ComponentProps } from "react";
import { Pencil } from "lucide-react";
import { cn } from "@/lib/utils";
/** A quiet native button; the owner supplies the editor and mutation lifecycle. */
export function InlineEditTrigger({ children, className, ...props }: ComponentProps<"button">) {
return <button type="button" className={cn("group inline-flex min-h-9 min-w-0 items-center gap-2 rounded-md px-1 py-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}>
{children}
<Pencil aria-hidden="true" className="size-4 shrink-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus:opacity-100 group-disabled:opacity-0" />
</button>;
}
All sources and standards