MCPcopy Create free account
hub / github.com/MagicCube/agentara / InputGroupAddon

Function InputGroupAddon

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

Source from the content-addressed store, hash-verified

56)
57
58function InputGroupAddon({
59 className,
60 align = "inline-start",
61 ...props
62}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
63 return (
64 <div
65 role="group"
66 data-slot="input-group-addon"
67 data-align={align}
68 className={cn(inputGroupAddonVariants({ align }), className)}
69 onClick={(e) => {
70 if ((e.target as HTMLElement).closest("button")) {
71 return
72 }
73 e.currentTarget.parentElement?.querySelector("input")?.focus()
74 }}
75 {...props}
76 />
77 )
78}
79
80const inputGroupButtonVariants = cva(
81 "flex items-center gap-2 text-sm shadow-none",

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected