mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
24 lines
483 B
TypeScript
24 lines
483 B
TypeScript
import { classNames } from "../../core/ui/classNames";
|
|
import { Text, type TextProps } from "../Text";
|
|
import "./index.css";
|
|
|
|
export interface HeadingProps extends Omit<TextProps, "size"> {
|
|
size?: `${1 | 2 | 3 | 4 | 5 | 6}`;
|
|
}
|
|
|
|
export function Heading({
|
|
className,
|
|
weight,
|
|
size = "1",
|
|
...props
|
|
}: HeadingProps) {
|
|
return (
|
|
<Text
|
|
{...props}
|
|
weight={weight ?? "medium"}
|
|
className={classNames("heading", className)}
|
|
data-size={size}
|
|
/>
|
|
);
|
|
}
|