MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / DocCallout

Function DocCallout

apps/docs/src/components/DocCallout.tsx:29–76  ·  view source on GitHub ↗
({
  children,
  eyebrow,
  title,
  variant = "note",
}: PropsWithChildren<DocCalloutProps>)

Source from the content-addressed store, hash-verified

27};
28
29export default function DocCallout({
30 children,
31 eyebrow,
32 title,
33 variant = "note",
34}: PropsWithChildren<DocCalloutProps>) {
35 return (
36 <aside
37 className={clsx(
38 "not-content relative my-6 overflow-hidden rounded-lg border border-[color-mix(in_srgb,var(--callout-accent)_32%,var(--bs-doc-line))] bg-[color-mix(in_srgb,var(--bs-doc-panel)_68%,transparent)] p-4 text-[var(--sl-color-text)] shadow-none",
39 "before:absolute before:inset-x-4 before:top-0 before:h-px before:bg-[linear-gradient(90deg,transparent,var(--callout-accent),transparent)] before:opacity-80",
40 variantClass[variant],
41 )}
42 >
43 <div className="relative grid grid-cols-[1.8rem_minmax(0,1fr)] gap-3">
44 <span
45 aria-hidden="true"
46 className="grid h-7 w-7 place-items-center rounded-md border border-[color-mix(in_srgb,var(--callout-accent)_34%,transparent)] bg-[color-mix(in_srgb,var(--callout-accent)_8%,transparent)] text-[var(--callout-title)]"
47 >
48 <svg
49 className="h-4 w-4"
50 fill="none"
51 stroke="currentColor"
52 strokeLinecap="round"
53 strokeLinejoin="round"
54 strokeWidth="1.8"
55 viewBox="0 0 24 24"
56 >
57 <path d={iconPaths[variant]} />
58 </svg>
59 </span>
60 <div className="min-w-0">
61 {eyebrow ? (
62 <p className="m-0 text-[0.72rem] font-black uppercase leading-none text-[color-mix(in_srgb,var(--callout-title)_78%,var(--callout-accent))]">
63 {eyebrow}
64 </p>
65 ) : null}
66 <p className={clsx("m-0 text-[0.98rem] font-extrabold leading-tight text-[var(--callout-title)]", eyebrow && "mt-1")}>
67 {title}
68 </p>
69 <div className="mt-2 leading-7 [&_a]:text-[var(--callout-title)] [&_a]:underline [&_code]:rounded-md [&_code]:border [&_code]:border-[color-mix(in_srgb,var(--callout-accent)_34%,transparent)] [&_code]:bg-[color-mix(in_srgb,var(--callout-accent)_10%,transparent)] [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:text-[var(--callout-title)] [&_p]:my-0 [&_p+p]:mt-3">
70 {children}
71 </div>
72 </div>
73 </div>
74 </aside>
75 );
76}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected