({
id,
inView,
children
}: {
id: string;
inView: boolean;
children: React.ReactNode;
})
| 43 | } |
| 44 | |
| 45 | function Anchor({ |
| 46 | id, |
| 47 | inView, |
| 48 | children |
| 49 | }: { |
| 50 | id: string; |
| 51 | inView: boolean; |
| 52 | children: React.ReactNode; |
| 53 | }) { |
| 54 | return ( |
| 55 | <Link |
| 56 | href={`#${id}`} |
| 57 | className="group text-inherit no-underline hover:text-inherit" |
| 58 | > |
| 59 | {inView && ( |
| 60 | <div className="absolute ml-[calc(-1*var(--width))] mt-1 hidden w-[var(--width)] opacity-0 transition [--width:calc(2.625rem+0.5px+50%-min(50%,calc(theme(maxWidth.lg)+theme(spacing.8))))] group-hover:opacity-100 group-focus:opacity-100 md:block lg:z-50 2xl:[--width:theme(spacing.10)]"> |
| 61 | <div className="group/anchor block h-5 w-5 rounded-lg bg-zinc-50 ring-1 ring-inset ring-zinc-300 transition hover:ring-zinc-500 dark:bg-zinc-800 dark:ring-zinc-700 dark:hover:bg-zinc-700 dark:hover:ring-zinc-600"> |
| 62 | <AnchorIcon className="h-5 w-5 stroke-zinc-500 transition dark:stroke-zinc-400 dark:group-hover/anchor:stroke-white" /> |
| 63 | </div> |
| 64 | </div> |
| 65 | )} |
| 66 | {children} |
| 67 | </Link> |
| 68 | ); |
| 69 | } |
| 70 | |
| 71 | export function Heading<Level extends 2 | 3>({ |
| 72 | children, |
nothing calls this directly
no outgoing calls
no test coverage detected