mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 20:56:11 +01:00
migrate 1
This commit is contained in:
1 parent
c637343593
commit
9839d4eef5
14 files changed
+263
-183
No files matched your search
@@ -0,0 +1,25 @@
|
||||
.heading {
|
||||
&[data-size="1"] {
|
||||
font-size: var(--font-size-heading-1);
|
||||
}
|
||||
|
||||
&[data-size="2"] {
|
||||
font-size: var(--font-size-heading-2);
|
||||
}
|
||||
|
||||
&[data-size="3"] {
|
||||
font-size: var(--font-size-heading-3);
|
||||
}
|
||||
|
||||
&[data-size="4"] {
|
||||
font-size: var(--font-size-heading-4);
|
||||
}
|
||||
|
||||
&[data-size="5"] {
|
||||
font-size: var(--font-size-heading-5);
|
||||
}
|
||||
|
||||
&[data-size="6"] {
|
||||
font-size: var(--font-size-heading-6);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { classNames } from "../../ui/classNames";
|
||||
import { Text, type TextProps } from "../Text";
|
||||
import styles from "./index.module.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(styles.heading, className)}
|
||||
data-size={size}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user