Download packages/stats/app/src/routes/section-heading.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/stats/app/src/routes/section-heading.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/stats/app/src/routes/section-heading.tsx
-
curl -L -o section-heading.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/stats/app/src/routes/section-heading.tsx
716 Bytes
| export function SectionHeading(props: { | |
| href: string | |
| title: string | |
| description?: string | |
| as?: "h2" | "p" | |
| slot?: string | |
| }) { | |
| const content = ( | |
| <> | |
| <strong> | |
| <a data-slot="heading-link" href={props.href}> | |
| <span data-slot="heading-anchor" aria-hidden="true"> | |
| # | |
| </span> | |
| {props.title} | |
| {props.description ? "." : ""} | |
| </a> | |
| </strong> | |
| {props.description && ( | |
| <> | |
| {" "} | |
| <span>{props.description}</span> | |
| </> | |
| )} | |
| </> | |
| ) | |
| if (props.as === "h2") return <h2 data-slot={props.slot ?? "section-title"}>{content}</h2> | |
| return <p data-slot={props.slot ?? "section-title"}>{content}</p> | |
| } | |