This commit is contained in:
laura 2025-11-01 23:46:32 -03:00
parent 30f2b4714d
commit 0c9f7a7822
Signed by: w
GPG key ID: BCD2117C99E69817
21 changed files with 1868 additions and 1839 deletions

View file

@ -6,24 +6,24 @@
import { ComponentChildren, h } from "preact";
interface TitleProps {
level?: 1 | 2 | 3 | 4 | 5 | 6;
children: ComponentChildren;
[key: string]: any;
level?: 1 | 2 | 3 | 4 | 5 | 6;
children: ComponentChildren;
[key: string]: any;
}
export default function Title({
level = 1,
children,
class: className,
...props
level = 1,
children,
class: className,
...props
}: TitleProps) {
const Heading = `h${Math.min(Math.max(level, 1), 6)}`;
return h(
Heading,
{
class: `title title-${level} ${className || ""}`,
...props,
},
children,
);
const Heading = `h${Math.min(Math.max(level, 1), 6)}`;
return h(
Heading,
{
class: `title title-${level} ${className || ""}`,
...props,
},
children,
);
}