3 Commits

Author SHA1 Message Date
62c0edf9af Update src/app/page.tsx 2026-03-12 19:51:44 +00:00
fa408bcde9 Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx 2026-03-12 19:51:19 +00:00
89e014a9c3 Update src/app/page.tsx 2026-03-12 19:51:19 +00:00
2 changed files with 29 additions and 40 deletions

View File

@@ -77,7 +77,7 @@ export default function LandingPage() {
{ text: "Our Story", href: "#" }, { text: "Our Story", href: "#" },
{ text: "Meet Our Team", href: "#" } { text: "Meet Our Team", href: "#" }
]} ]}
buttonAnimation="entrance-slide" buttonAnimation="slide-up"
/> />
</div> </div>

View File

@@ -1,51 +1,40 @@
"use client"; import React from 'react';
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
interface SvgTextLogoProps { interface SvgTextLogoProps {
logoText: string; text: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
className?: string; className?: string;
containerClassName?: string;
textClassName?: string;
} }
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({ const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
logoText, text,
adjustHeightFactor, className = '',
verticalAlign = "top", containerClassName = 'w-full h-full',
className = "", textClassName = '',
}) { }) => {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); const characters = text.split('');
return ( return (
<svg <svg
ref={svgRef} viewBox={`0 0 ${text.length * 100} 120`}
viewBox={viewBox} className={containerClassName}
className={cls("w-full", className)} preserveAspectRatio="xMidYMid meet"
style={{ aspectRatio: aspectRatio }}
preserveAspectRatio="none"
role="img"
aria-label={`${logoText} logo`}
> >
{characters.map((char, index) => (
<text <text
ref={textRef} key={index}
x="0" x={index * 100 + 50}
y={verticalAlign === "center" ? "50%" : "0"} y={90}
className="font-bold fill-current" textAnchor="middle"
style={{ className={`text-4xl font-bold fill-current ${textClassName}`}
fontSize: "20px", dominantBaseline="middle"
letterSpacing: "-0.02em",
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge"
}}
> >
{logoText} {char}
</text> </text>
))}
</svg> </svg>
); );
}); };
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo; export default SvgTextLogo;