✨ Add aksel.nav.no website with live component examples

Vite + React docs site that imports @navikt/ds-react, @navikt/ds-css and
@navikt/ds-tokens from the workspace and renders every component.
Heading level now accepts string literals to match JSX usage.
This commit is contained in:
Aksel Mini committed 2026-08-25 10:05:00 +02:00
1 parent adfcead7be
commit 9c8f55f5cf
10 files changed
+1242 -3

No files matched your search

+3 -3
View File
@@ -10,13 +10,13 @@ export interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
size?: "xlarge" | "large" | "medium" | "small" | "xsmall";
/**
* Semantic heading level (h1–h6).
* @default 1
* @default "1"
*/
level?: 1 | 2 | 3 | 4 | 5 | 6;
level?: "1" | "2" | "3" | "4" | "5" | "6";
}
export const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading(
{ size = "medium", level = 1, className, ...rest },
{ size = "medium", level = "1", className, ...rest },
ref,
) {
return createElement(`h${level}`, {