Update components/subheading.tsx
This commit is contained in:
parent
a2a948a4c7
commit
f6d0fdbc72
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
import { MotionProps } from "framer-motion";
|
||||||
|
import React from "react";
|
||||||
|
import Balancer from "react-wrap-balancer";
|
||||||
|
|
||||||
|
export const Subheading = ({
|
||||||
|
className,
|
||||||
|
as: Tag = "h2",
|
||||||
|
children,
|
||||||
|
..._props
|
||||||
|
}: {
|
||||||
|
className?: string;
|
||||||
|
as?: any;
|
||||||
|
children: any;
|
||||||
|
props?: React.HTMLAttributes<HTMLHeadingElement>;
|
||||||
|
} & MotionProps &
|
||||||
|
React.HTMLAttributes<HTMLHeadingElement>) => {
|
||||||
|
return (
|
||||||
|
<Tag
|
||||||
|
className={cn(
|
||||||
|
"text-sm md:text-base max-w-4xl text-left my-4 mx-auto",
|
||||||
|
"text-muted text-center font-normal dark:text-muted-dark",
|
||||||
|
className,
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Balancer>{children}</Balancer>
|
||||||
|
</Tag>
|
||||||
|
);
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue