22 lines
479 B
TypeScript
22 lines
479 B
TypeScript
import { headingVariants } from "./variants"
|
|
|
|
import type { HeadingProps } from "@/types/components/myPages/myProfile/card/title"
|
|
|
|
export default function Title({
|
|
as,
|
|
children,
|
|
className = "",
|
|
level = "h1",
|
|
uppercase = false,
|
|
weight,
|
|
}: HeadingProps) {
|
|
const Hx = level
|
|
const classNames = headingVariants({
|
|
className,
|
|
text: uppercase ? "uppercase" : undefined,
|
|
type: as ?? level,
|
|
weight,
|
|
})
|
|
return <Hx className={classNames}>{children}</Hx>
|
|
}
|