From 81fe33d368f75a3dcae6250f61cc55d48c25baaa Mon Sep 17 00:00:00 2001 From: kleap-admin Date: Thu, 15 Jan 2026 13:42:02 +0000 Subject: [PATCH] Update components/heading.tsx --- components/heading.tsx | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 components/heading.tsx diff --git a/components/heading.tsx b/components/heading.tsx new file mode 100644 index 0000000..1f0a37a --- /dev/null +++ b/components/heading.tsx @@ -0,0 +1,40 @@ +import { cn } from "@/lib/utils"; +import { MotionProps } from "framer-motion"; +import React from "react"; +import Balancer from "react-wrap-balancer"; + +export const Heading = ({ + className, + as: Tag = "h2", + children, + size = "md", + ...props +}: { + className?: string; + as?: any; + children: any; + size?: "sm" | "md" | "xl" | "2xl"; + props?: React.HTMLAttributes; +} & MotionProps & + React.HTMLAttributes) => { + const sizeVariants = { + sm: "text-xl md:text-2xl md:leading-snug", + md: "text-3xl md:text-5xl md:leading-tight", + xl: "text-4xl md:text-6xl md:leading-none", + "2xl": "text-5xl md:text-7xl md:leading-none", + }; + return ( + + {children} + + ); +};