MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / Info

Function Info

packages/react/src/components/info.tsx:25–50  ·  view source on GitHub ↗
({
  className,
  variant = "default",
  children,
  ...props
}: React.ComponentProps<"section"> & {
  readonly variant?: InfoVariant;
})

Source from the content-addressed store, hash-verified

23};
24
25function Info({
26 className,
27 variant = "default",
28 children,
29 ...props
30}: React.ComponentProps<"section"> & {
31 readonly variant?: InfoVariant;
32}) {
33 const Icon = variant === "warning" ? TriangleAlertIcon : InfoIcon;
34 const variantClass = variantClassName[variant];
35 return (
36 <section
37 data-slot="info"
38 className={cn(
39 "grid grid-cols-[auto_1fr] gap-x-2.5 gap-y-1 rounded-md border px-3 py-2.5 text-sm",
40 variant === "warning" ? "border-l-[3px]" : null,
41 variantClass.root,
42 className,
43 )}
44 {...props}
45 >
46 <Icon className={cn("mt-0.5 size-4", variantClass.icon)} aria-hidden />
47 <div className="min-w-0 space-y-1.5">{children}</div>
48 </section>
49 );
50}
51
52function InfoTitle({ className, ...props }: React.ComponentProps<"div">) {
53 return (

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected