MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / InputGroupAddon

Function InputGroupAddon

components/ui/input-group.tsx:46–66  ·  view source on GitHub ↗
({
  className,
  align = "inline-start",
  ...props
}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>)

Source from the content-addressed store, hash-verified

44);
45
46function InputGroupAddon({
47 className,
48 align = "inline-start",
49 ...props
50}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
51 return (
52 <div
53 role="group"
54 data-slot="input-group-addon"
55 data-align={align}
56 className={cn(inputGroupAddonVariants({ align }), className)}
57 onClick={(e) => {
58 if ((e.target as HTMLElement).closest("button")) {
59 return;
60 }
61 e.currentTarget.parentElement?.querySelector("input")?.focus();
62 }}
63 {...props}
64 />
65 );
66}
67
68const inputGroupButtonVariants = cva(
69 "gap-2 text-xs shadow-none flex items-center",

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected