Merge version_1 into main #2

Merged
bender merged 6 commits from version_1 into main 2026-03-13 03:38:22 +00:00
6 changed files with 131 additions and 336 deletions

View File

@@ -11,17 +11,15 @@ import { Star, Users, MapPin, Clock, MessageSquare } from "lucide-react";
export default function AboutPage() {
const navItems = [
{ name: "Home", id: "home" },
{ name: "About", id: "about" },
{ name: "Menu", id: "menu" },
{ name: "Reviews", id: "reviews" },
{ name: "Contact", id: "contact" },
{ name: "Home", id: "/" },
{ name: "About", id: "/about" },
{ name: "Menu", id: "/menu" },
{ name: "Reviews", id: "/reviews" },
{ name: "Contact", id: "/contact" },
];
const navButton = {
text: "Order Now",
href: "menu",
};
text: "Order Now", href: "menu"};
return (
<ThemeProvider
@@ -53,16 +51,12 @@ export default function AboutPage() {
tag="Since 2024"
tagIcon={Star}
tagAnimation="slide-up"
background={{ variant: "animated-grid" }}
background={{ variant: "glowing-orb" }}
buttons={[
{
text: "Visit Us Today",
href: "tel:+61370026274",
},
text: "Visit Us Today", href: "tel:+61370026274"},
{
text: "View Menu",
href: "/",
},
text: "View Menu", href: "/menu"},
]}
buttonAnimation="slide-up"
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=2rqhl8"
@@ -80,24 +74,16 @@ export default function AboutPage() {
metrics={[
{
icon: Star,
label: "Customer Satisfaction",
value: "4.7⭐",
},
label: "Customer Satisfaction", value: "4.7⭐"},
{
icon: Users,
label: "Community",
value: "79+ Reviews",
},
label: "Community", value: "79+ Reviews"},
{
icon: MapPin,
label: "Location",
value: "Glen Waverley",
},
label: "Location", value: "Glen Waverley"},
{
icon: Clock,
label: "Operating Since",
value: "2024",
},
label: "Operating Since", value: "2024"},
]}
metricsAnimation="slide-up"
useInvertedBackground={false}
@@ -114,13 +100,9 @@ export default function AboutPage() {
description="Located at Level 1, 73/75 Kingsway, Glen Waverley VIC 3150. We're open daily from 10am to 10pm, ready to serve you the most delicious desserts in Melbourne. Whether you're craving egg waffles, bingsu, or specialty drinks, we've got something sweet for everyone."
buttons={[
{
text: "Call Us: +61 3 7002 6274",
href: "tel:+61370026274",
},
text: "Call Us: +61 3 7002 6274", href: "tel:+61370026274"},
{
text: "Message on WhatsApp",
href: "https://wa.me/61370026274",
},
text: "Message on WhatsApp", href: "https://wa.me/61370026274"},
]}
buttonAnimation="slide-up"
background={{ variant: "sparkles-gradient" }}
@@ -133,62 +115,37 @@ export default function AboutPage() {
<FooterBaseReveal
columns={[
{
title: "Sweetag",
items: [
title: "Sweetag", items: [
{
label: "Home",
href: "/",
},
label: "Home", href: "/"},
{
label: "About",
href: "/about",
},
label: "About", href: "/about"},
{
label: "Menu",
href: "/",
},
label: "Menu", href: "/menu"},
{
label: "Reviews",
href: "/",
},
label: "Reviews", href: "/reviews"},
],
},
{
title: "Contact",
items: [
title: "Contact", items: [
{
label: "Phone: +61 3 7002 6274",
href: "tel:+61370026274",
},
label: "Phone: +61 3 7002 6274", href: "tel:+61370026274"},
{
label: "WhatsApp",
href: "https://wa.me/61370026274",
},
label: "WhatsApp", href: "https://wa.me/61370026274"},
{
label: "Glen Waverley, VIC",
href: "#",
},
label: "Glen Waverley, VIC", href: "#"},
{
label: "Hours: 10am - 10pm",
href: "#",
},
label: "Hours: 10am - 10pm", href: "#"},
],
},
{
title: "Legal",
items: [
title: "Legal", items: [
{
label: "Privacy Policy",
href: "#",
},
label: "Privacy Policy", href: "#"},
{
label: "Terms of Service",
href: "#",
},
label: "Terms of Service", href: "#"},
{
label: "Contact Form",
href: "/",
},
label: "Contact Form", href: "/contact"},
],
},
]}

View File

@@ -17,8 +17,7 @@ export default function ContactPage() {
const footerColumns = [
{
title: "Sweetag",
items: [
title: "Sweetag", items: [
{ label: "Home", href: "/" },
{ label: "About", href: "/about" },
{ label: "Menu", href: "/menu" },
@@ -26,8 +25,7 @@ export default function ContactPage() {
],
},
{
title: "Contact",
items: [
title: "Contact", items: [
{ label: "Phone: +61 3 7002 6274", href: "tel:+61370026274" },
{ label: "WhatsApp", href: "https://wa.me/61370026274" },
{ label: "Glen Waverley, VIC", href: "#" },
@@ -35,8 +33,7 @@ export default function ContactPage() {
],
},
{
title: "Legal",
items: [
title: "Legal", items: [
{ label: "Privacy Policy", href: "#" },
{ label: "Terms of Service", href: "#" },
{ label: "Contact Form", href: "/contact" },
@@ -62,9 +59,7 @@ export default function ContactPage() {
brandName="Sweetag"
navItems={navItems}
button={{
text: "Order Now",
href: "/menu",
}}
text: "Order Now", href: "/menu"}}
/>
</div>
@@ -77,18 +72,13 @@ export default function ContactPage() {
description="Call us, message on WhatsApp, or fill out our contact form. We're located at Level 1, 73/75 Kingsway, Glen Waverley VIC 3150, and open daily from 10am."
buttons={[
{
text: "Call: +61 3 7002 6274",
href: "tel:+61370026274",
},
text: "Call: +61 3 7002 6274", href: "tel:+61370026274"},
{
text: "WhatsApp Message",
href: "https://wa.me/61370026274",
},
text: "WhatsApp Message", href: "https://wa.me/61370026274"},
]}
buttonAnimation="slide-up"
background={{
variant: "radial-gradient",
}}
variant: "radial-gradient"}}
useInvertedBackground={false}
/>
</div>

View File

@@ -42,28 +42,13 @@ export default function MenuPage() {
<ProductCardOne
products={[
{
id: "5",
name: "Classic Egg Waffle",
price: "$9.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=3357bs&_wi=2",
imageAlt: "Classic egg waffle",
onProductClick: () => console.log("Product clicked"),
id: "5", name: "Classic Egg Waffle", price: "$9.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=3357bs", imageAlt: "Classic egg waffle", onProductClick: () => console.log("Product clicked"),
},
{
id: "6",
name: "Strawberry Bingsu",
price: "$12.00",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=2xby32&_wi=2",
imageAlt: "Strawberry bingsu",
onProductClick: () => console.log("Product clicked"),
id: "6", name: "Strawberry Bingsu", price: "$12.00", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=2xby32", imageAlt: "Strawberry bingsu", onProductClick: () => console.log("Product clicked"),
},
{
id: "7",
name: "Iced Latte Special",
price: "$7.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0ne0sk&_wi=2",
imageAlt: "Iced specialty latte",
onProductClick: () => console.log("Product clicked"),
id: "7", name: "Iced Latte Special", price: "$7.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0ne0sk", imageAlt: "Iced specialty latte", onProductClick: () => console.log("Product clicked"),
},
]}
title="Menu Highlights"
@@ -87,36 +72,16 @@ export default function MenuPage() {
<ProductCardOne
products={[
{
id: "1",
name: "Crispy Egg Waffle",
price: "$9.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=s7l4xs&_wi=2",
imageAlt: "Egg waffle with toppings",
onProductClick: () => console.log("Product clicked"),
id: "1", name: "Crispy Egg Waffle", price: "$9.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=s7l4xs", imageAlt: "Egg waffle with toppings", onProductClick: () => console.log("Product clicked"),
},
{
id: "2",
name: "Refreshing Bingsu",
price: "$10.00",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=i8bhwl&_wi=2",
imageAlt: "Korean shaved ice bingsu",
onProductClick: () => console.log("Product clicked"),
id: "2", name: "Refreshing Bingsu", price: "$10.00", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=i8bhwl", imageAlt: "Korean shaved ice bingsu", onProductClick: () => console.log("Product clicked"),
},
{
id: "3",
name: "Ice Cream Waffle",
price: "$11.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=53fo76&_wi=2",
imageAlt: "Ice cream waffle cone",
onProductClick: () => console.log("Product clicked"),
id: "3", name: "Ice Cream Waffle", price: "$11.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=53fo76", imageAlt: "Ice cream waffle cone", onProductClick: () => console.log("Product clicked"),
},
{
id: "4",
name: "Specialty Drinks",
price: "$6.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=x884tc&_wi=2",
imageAlt: "Colorful specialty beverages",
onProductClick: () => console.log("Product clicked"),
id: "4", name: "Specialty Drinks", price: "$6.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=x884tc", imageAlt: "Colorful specialty beverages", onProductClick: () => console.log("Product clicked"),
},
]}
title="Our Signature Desserts"
@@ -154,8 +119,7 @@ export default function MenuPage() {
<FooterBaseReveal
columns={[
{
title: "Sweetag",
items: [
title: "Sweetag", items: [
{ label: "Home", href: "/" },
{ label: "About", href: "/about" },
{ label: "Menu", href: "/menu" },
@@ -163,8 +127,7 @@ export default function MenuPage() {
],
},
{
title: "Contact",
items: [
title: "Contact", items: [
{ label: "Phone: +61 3 7002 6274", href: "tel:+61370026274" },
{ label: "WhatsApp", href: "https://wa.me/61370026274" },
{ label: "Glen Waverley, VIC", href: "#" },
@@ -172,8 +135,7 @@ export default function MenuPage() {
],
},
{
title: "Legal",
items: [
title: "Legal", items: [
{ label: "Privacy Policy", href: "#" },
{ label: "Terms of Service", href: "#" },
{ label: "Contact Form", href: "/contact" },

View File

@@ -21,9 +21,7 @@ export default function HomePage() {
];
const navButton = {
text: "Order Now",
href: "menu",
};
text: "Order Now", href: "menu"};
return (
<ThemeProvider
@@ -58,13 +56,9 @@ export default function HomePage() {
background={{ variant: "glowing-orb" }}
buttons={[
{
text: "Call Now",
href: "tel:+61370026274",
},
text: "Call Now", href: "tel:+61370026274"},
{
text: "View Menu",
href: "menu",
},
text: "View Menu", href: "menu"},
]}
buttonAnimation="slide-up"
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=xvqo3w"
@@ -85,33 +79,13 @@ export default function HomePage() {
tagAnimation="slide-up"
products={[
{
id: "1",
name: "Crispy Egg Waffle",
price: "$9.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=s7l4xs&_wi=1",
imageAlt: "Egg waffle with toppings",
},
id: "1", name: "Crispy Egg Waffle", price: "$9.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=s7l4xs", imageAlt: "Egg waffle with toppings"},
{
id: "2",
name: "Refreshing Bingsu",
price: "$10.00",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=i8bhwl&_wi=1",
imageAlt: "Korean shaved ice bingsu",
},
id: "2", name: "Refreshing Bingsu", price: "$10.00", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=i8bhwl", imageAlt: "Korean shaved ice bingsu"},
{
id: "3",
name: "Ice Cream Waffle",
price: "$11.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=53fo76&_wi=1",
imageAlt: "Ice cream waffle cone",
},
id: "3", name: "Ice Cream Waffle", price: "$11.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=53fo76", imageAlt: "Ice cream waffle cone"},
{
id: "4",
name: "Specialty Drinks",
price: "$6.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=x884tc&_wi=1",
imageAlt: "Colorful specialty beverages",
},
id: "4", name: "Specialty Drinks", price: "$6.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=x884tc", imageAlt: "Colorful specialty beverages"},
]}
gridVariant="two-columns-alternating-heights"
animationType="slide-up"
@@ -119,9 +93,7 @@ export default function HomePage() {
useInvertedBackground={false}
buttons={[
{
text: "See Full Menu",
href: "menu",
},
text: "See Full Menu", href: "menu"},
]}
buttonAnimation="slide-up"
/>
@@ -134,24 +106,16 @@ export default function HomePage() {
metrics={[
{
icon: Star,
label: "Customer Rating",
value: "4.7⭐",
},
label: "Customer Rating", value: "4.7⭐"},
{
icon: Users,
label: "Happy Customers",
value: "79+",
},
label: "Happy Customers", value: "79+"},
{
icon: MapPin,
label: "Location",
value: "Glen Waverley",
},
label: "Location", value: "Glen Waverley"},
{
icon: Clock,
label: "Hours Daily",
value: "Open 10am",
},
label: "Hours Daily", value: "Open 10am"},
]}
metricsAnimation="slide-up"
useInvertedBackground={true}
@@ -163,29 +127,13 @@ export default function HomePage() {
<TestimonialCardTwelve
testimonials={[
{
id: "1",
name: "Sarah Johnson",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=5mmprl&_wi=1",
imageAlt: "Sarah Johnson",
},
id: "1", name: "Sarah Johnson", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=5mmprl", imageAlt: "Sarah Johnson"},
{
id: "2",
name: "Michael Chen",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=bh0j8d&_wi=1",
imageAlt: "Michael Chen",
},
id: "2", name: "Michael Chen", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=bh0j8d", imageAlt: "Michael Chen"},
{
id: "3",
name: "Emma Rodriguez",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=v53czx&_wi=1",
imageAlt: "Emma Rodriguez",
},
id: "3", name: "Emma Rodriguez", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=v53czx", imageAlt: "Emma Rodriguez"},
{
id: "4",
name: "David Park",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=tg8p5e&_wi=1",
imageAlt: "David Park",
},
id: "4", name: "David Park", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=tg8p5e", imageAlt: "David Park"},
]}
cardTitle="Join thousands of dessert lovers enjoying Sweetag's crispy egg waffles, refreshing bingsu, and sweet treats"
cardTag="Trusted by Melbourne"
@@ -205,26 +153,11 @@ export default function HomePage() {
tagAnimation="slide-up"
products={[
{
id: "5",
name: "Classic Egg Waffle",
price: "$9.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=3357bs&_wi=1",
imageAlt: "Classic egg waffle",
},
id: "5", name: "Classic Egg Waffle", price: "$9.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=3357bs", imageAlt: "Classic egg waffle"},
{
id: "6",
name: "Strawberry Bingsu",
price: "$12.00",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=2xby32&_wi=1",
imageAlt: "Strawberry bingsu",
},
id: "6", name: "Strawberry Bingsu", price: "$12.00", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=2xby32", imageAlt: "Strawberry bingsu"},
{
id: "7",
name: "Iced Latte Special",
price: "$7.50",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0ne0sk&_wi=1",
imageAlt: "Iced specialty latte",
},
id: "7", name: "Iced Latte Special", price: "$7.50", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0ne0sk", imageAlt: "Iced specialty latte"},
]}
gridVariant="three-columns-all-equal-width"
animationType="slide-up"
@@ -232,13 +165,9 @@ export default function HomePage() {
useInvertedBackground={true}
buttons={[
{
text: "View Full Menu",
href: "menu",
},
text: "View Full Menu", href: "menu"},
{
text: "Order Online",
href: "https://example.com/order",
},
text: "Order Online", href: "https://example.com/order"},
]}
buttonAnimation="slide-up"
/>
@@ -254,13 +183,9 @@ export default function HomePage() {
description="Call us, message on WhatsApp, or fill out our contact form. We're located at Level 1, 73/75 Kingsway, Glen Waverley VIC 3150, and open daily from 10am."
buttons={[
{
text: "Call: +61 3 7002 6274",
href: "tel:+61370026274",
},
text: "Call: +61 3 7002 6274", href: "tel:+61370026274"},
{
text: "WhatsApp Message",
href: "https://wa.me/61370026274",
},
text: "WhatsApp Message", href: "https://wa.me/61370026274"},
]}
buttonAnimation="slide-up"
background={{ variant: "radial-gradient" }}
@@ -273,62 +198,37 @@ export default function HomePage() {
<FooterBaseReveal
columns={[
{
title: "Sweetag",
items: [
title: "Sweetag", items: [
{
label: "Home",
href: "/",
},
label: "Home", href: "/"},
{
label: "About",
href: "/about",
},
label: "About", href: "/about"},
{
label: "Menu",
href: "/menu",
},
label: "Menu", href: "/menu"},
{
label: "Reviews",
href: "/reviews",
},
label: "Reviews", href: "/reviews"},
],
},
{
title: "Contact",
items: [
title: "Contact", items: [
{
label: "Phone: +61 3 7002 6274",
href: "tel:+61370026274",
},
label: "Phone: +61 3 7002 6274", href: "tel:+61370026274"},
{
label: "WhatsApp",
href: "https://wa.me/61370026274",
},
label: "WhatsApp", href: "https://wa.me/61370026274"},
{
label: "Glen Waverley, VIC",
href: "#",
},
label: "Glen Waverley, VIC", href: "#"},
{
label: "Hours: 10am - 10pm",
href: "#",
},
label: "Hours: 10am - 10pm", href: "#"},
],
},
{
title: "Legal",
items: [
title: "Legal", items: [
{
label: "Privacy Policy",
href: "#",
},
label: "Privacy Policy", href: "#"},
{
label: "Terms of Service",
href: "#",
},
label: "Terms of Service", href: "#"},
{
label: "Contact Form",
href: "/contact",
},
label: "Contact Form", href: "/contact"},
],
},
]}

View File

@@ -41,29 +41,13 @@ export default function ReviewsPage() {
<TestimonialCardTwelve
testimonials={[
{
id: "1",
name: "Sarah Johnson",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=5mmprl&_wi=2",
imageAlt: "Sarah Johnson",
},
id: "1", name: "Sarah Johnson", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=5mmprl", imageAlt: "Sarah Johnson"},
{
id: "2",
name: "Michael Chen",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=bh0j8d&_wi=2",
imageAlt: "Michael Chen",
},
id: "2", name: "Michael Chen", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=bh0j8d", imageAlt: "Michael Chen"},
{
id: "3",
name: "Emma Rodriguez",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=v53czx&_wi=2",
imageAlt: "Emma Rodriguez",
},
id: "3", name: "Emma Rodriguez", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=v53czx", imageAlt: "Emma Rodriguez"},
{
id: "4",
name: "David Park",
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=tg8p5e&_wi=2",
imageAlt: "David Park",
},
id: "4", name: "David Park", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=tg8p5e", imageAlt: "David Park"},
]}
cardTitle="Join thousands of dessert lovers enjoying Sweetag's crispy egg waffles, refreshing bingsu, and sweet treats"
cardTag="Trusted by Melbourne"
@@ -94,8 +78,7 @@ export default function ReviewsPage() {
<FooterBaseReveal
columns={[
{
title: "Sweetag",
items: [
title: "Sweetag", items: [
{ label: "Home", href: "/" },
{ label: "About", href: "/about" },
{ label: "Menu", href: "/menu" },
@@ -103,8 +86,7 @@ export default function ReviewsPage() {
],
},
{
title: "Contact",
items: [
title: "Contact", items: [
{ label: "Phone: +61 3 7002 6274", href: "tel:+61370026274" },
{ label: "WhatsApp", href: "https://wa.me/61370026274" },
{ label: "Glen Waverley, VIC", href: "#" },
@@ -112,8 +94,7 @@ export default function ReviewsPage() {
],
},
{
title: "Legal",
items: [
title: "Legal", items: [
{ label: "Privacy Policy", href: "#" },
{ label: "Terms of Service", href: "#" },
{ label: "Contact Form", href: "/contact" },

View File

@@ -1,51 +1,56 @@
"use client";
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
import React from 'react';
interface SvgTextLogoProps {
logoText: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
text: string;
className?: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: number | string;
letterSpacing?: number;
dominantBaseline?: SVGAttributes<SVGTextElement>['dominantBaseline'];
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontFamily = 'system-ui, -apple-system, sans-serif',
fontWeight = 700,
letterSpacing = 0,
dominantBaseline = 'middle',
}) => {
return (
<svg
ref={svgRef}
viewBox={viewBox}
className={cls("w-full", className)}
style={{ aspectRatio: aspectRatio }}
preserveAspectRatio="none"
role="img"
aria-label={`${logoText} logo`}
viewBox="0 0 300 100"
className={`w-full h-auto ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<style>
{`
.svg-text {
font-size: ${fontSize}px;
font-family: ${fontFamily};
font-weight: ${fontWeight};
letter-spacing: ${letterSpacing}px;
fill: currentColor;
}
`}
</style>
</defs>
<text
ref={textRef}
x="0"
y={verticalAlign === "center" ? "50%" : "0"}
className="font-bold fill-current"
style={{
fontSize: "20px",
letterSpacing: "-0.02em",
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge"
}}
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline={dominantBaseline}
className="svg-text"
>
{logoText}
{text}
</text>
</svg>
);
});
SvgTextLogo.displayName = "SvgTextLogo";
};
export default SvgTextLogo;
import type { SVGAttributes } from 'react';