1
Fork 0

Add documentation to the components and layouts.

This commit is contained in:
Bauke 2023-09-28 10:37:41 +02:00
parent 0b26dcf764
commit 4bb6ada162
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 14 additions and 0 deletions

View File

@ -1,13 +1,20 @@
import "./page-header.scss";
/** Properties for the {@linkcode PageHeader} component. */
type Props = {
/** Whether this header should use the full width and height of the viewport. */
fullPage?: boolean;
/** The `alt` attribute to use for the logo `<img>`. */
logoAlt?: string;
/** The `src` attribute to use for the logo `<img>`. */
logoSrc?: string;
/** The subtitle to put beneath the `<h1>`. */
subtitle?: string;
/** The text for the `<h1>`. */
title?: string;
};
/** Shared header component for all pages. */
export function PageHeader(props: Props): JsxElement {
const {fullPage, logoAlt, logoSrc, subtitle, title} = props;

View File

@ -1,9 +1,16 @@
---
import "../scss/common.scss";
/** Properties for the base layout. */
interface Props {
/** MDX frontmatter. */
frontmatter: {
/**
* Path to an image to use as the favicon, defaults to the Tildes Community
* logo.
*/
favicon?: string;
/** The text to use for the `<title>` element. */
pageTitle: string;
};
}