MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / InputGroupAddon

Function InputGroupAddon

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected