All files / app-leaderboard/src/pages/components prose.ts

100% Statements 2/2
75% Branches 3/4
100% Functions 1/1
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23          11x       44x                          
import type { PageContent } from '../template.ts';
import { html, nothing } from '@be-music/service-web-theme/server';
/** Long-form text for the About and Help pages: a titled section of muted paragraphs. */
 
/** The link style inside prose. */
export const PROSE_LINK = 'text-foreground underline underline-offset-4 hover:text-primary';
 
/** One section, the link target `#id`: a heading and its paragraphs, lists or terms. `loose` spaces the heading wider. */
export function ProseSection(props: { id: string; title: PageContent; loose?: boolean; children: PageContent }) {
  return html`<section
    class=${`scroll-mt-6 ${props.loose === true ? 'space-y-3' : 'space-y-2'}`}
    id=${props.id ?? nothing}
    aria-labelledby=${`${props.id}-title`}
  >
    <h2 id=${`${props.id}-title`} class="text-base font-semibold tracking-tight">${props.title}</h2>
    <div
      class="text-muted-foreground max-w-prose space-y-2 text-sm leading-relaxed [&amp;_li]:ms-5 [&amp;_li]:list-disc [&amp;_strong]:text-foreground [&amp;_strong]:font-medium"
    >
      ${props.children}
    </div>
  </section>`;
}