Merge version_1 into main #2
290
src/app/page.tsx
290
src/app/page.tsx
@@ -25,8 +25,7 @@ export default function HomePage() {
|
||||
|
||||
const footerColumns = [
|
||||
{
|
||||
title: "Company",
|
||||
items: [
|
||||
title: "Company", items: [
|
||||
{ label: "Home", href: "/" },
|
||||
{ label: "About Us", href: "/about" },
|
||||
{ label: "Our Projects", href: "/projects" },
|
||||
@@ -34,8 +33,7 @@ export default function HomePage() {
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Services",
|
||||
items: [
|
||||
title: "Services", items: [
|
||||
{ label: "Custom Homes", href: "/services" },
|
||||
{ label: "Renovations", href: "/services" },
|
||||
{ label: "Development", href: "/services" },
|
||||
@@ -43,8 +41,7 @@ export default function HomePage() {
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Contact",
|
||||
items: [
|
||||
title: "Contact", items: [
|
||||
{ label: "Contact Us", href: "/contact" },
|
||||
{ label: "Get a Quote", href: "/contact" },
|
||||
{ label: "Privacy Policy", href: "#" },
|
||||
@@ -82,35 +79,20 @@ export default function HomePage() {
|
||||
mediaAnimation="slide-up"
|
||||
testimonials={[
|
||||
{
|
||||
name: "Sarah Johnson",
|
||||
handle: "Homeowner, San Francisco",
|
||||
testimonial:
|
||||
"Professional from start to finish. The team delivered exactly what they promised. Incredible attention to detail.",
|
||||
rating: 5,
|
||||
name: "Sarah Johnson", handle: "Homeowner, San Francisco", testimonial:
|
||||
"Professional from start to finish. The team delivered exactly what they promised. Incredible attention to detail.", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/confident-businessman-posing-outside_74855-1551.jpg?_wi=1",
|
||||
imageAlt: "Sarah Johnson",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/confident-businessman-posing-outside_74855-1551.jpg", imageAlt: "Sarah Johnson"},
|
||||
{
|
||||
name: "Michael Chen",
|
||||
handle: "Developer, Bay Area",
|
||||
testimonial:
|
||||
"Our dream home came to life with Monarch. The craftsmanship is truly exceptional.",
|
||||
rating: 5,
|
||||
name: "Michael Chen", handle: "Developer, Bay Area", testimonial:
|
||||
"Our dream home came to life with Monarch. The craftsmanship is truly exceptional.", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/cheerful-young-businesswoman-smiling-camera_74855-4022.jpg?_wi=1",
|
||||
imageAlt: "Michael Chen",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/cheerful-young-businesswoman-smiling-camera_74855-4022.jpg", imageAlt: "Michael Chen"},
|
||||
{
|
||||
name: "Emily Rodriguez",
|
||||
handle: "Property Owner, Peninsula",
|
||||
testimonial:
|
||||
"Transparent pricing, clear communication, and beautiful results. Monarch exceeded all expectations.",
|
||||
rating: 5,
|
||||
name: "Emily Rodriguez", handle: "Property Owner, Peninsula", testimonial:
|
||||
"Transparent pricing, clear communication, and beautiful results. Monarch exceeded all expectations.", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/handsome-gay-official-suit-looking-camera-front-view-bearded-caucasian-man-smiling-camera-getting-dressed-wedding-ceremony-with-lover-lgbt-love-marriage-concept_74855-22937.jpg?_wi=1",
|
||||
imageAlt: "Emily Rodriguez",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/handsome-gay-official-suit-looking-camera-front-view-bearded-caucasian-man-smiling-camera-getting-dressed-wedding-ceremony-with-lover-lgbt-love-marriage-concept_74855-22937.jpg", imageAlt: "Emily Rodriguez"},
|
||||
]}
|
||||
buttons={[
|
||||
{ text: "Get a Free Quote", href: "/contact" },
|
||||
@@ -129,15 +111,7 @@ export default function HomePage() {
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={true}
|
||||
names={[
|
||||
"Licensed & Insured",
|
||||
"Premium Materials Only",
|
||||
"5-Star Reviews",
|
||||
"15+ Years Experience",
|
||||
"120+ Projects Completed",
|
||||
"100% Client Satisfaction",
|
||||
"Transparent Process",
|
||||
"Custom Designs",
|
||||
]}
|
||||
"Licensed & Insured", "Premium Materials Only", "5-Star Reviews", "15+ Years Experience", "120+ Projects Completed", "100% Client Satisfaction", "Transparent Process", "Custom Designs"]}
|
||||
speed={40}
|
||||
showCard={true}
|
||||
/>
|
||||
@@ -147,49 +121,25 @@ export default function HomePage() {
|
||||
<FeatureCardTwentyFour
|
||||
features={[
|
||||
{
|
||||
id: "1",
|
||||
title: "Custom Home Construction",
|
||||
author: "Luxury Homes",
|
||||
description:
|
||||
"Bespoke homes designed and built from the ground up with the finest materials and uncompromising attention to detail.",
|
||||
tags: ["Residential", "Custom Design", "Premium"],
|
||||
id: "1", title: "Custom Home Construction", author: "Luxury Homes", description:
|
||||
"Bespoke homes designed and built from the ground up with the finest materials and uncompromising attention to detail.", tags: ["Residential", "Custom Design", "Premium"],
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/luxurious-modern-villa-with-infinity-pool-lush-landscape_23-2152008242.jpg?_wi=1",
|
||||
imageAlt: "Modern luxury villa exterior",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/luxurious-modern-villa-with-infinity-pool-lush-landscape_23-2152008242.jpg", imageAlt: "Modern luxury villa exterior"},
|
||||
{
|
||||
id: "2",
|
||||
title: "Renovations & Remodeling",
|
||||
author: "Transformation",
|
||||
description:
|
||||
"Transform outdated spaces into modern masterpieces. Full-scale renovations that honor original character while adding contemporary luxury.",
|
||||
tags: ["Renovation", "Modernization", "Design"],
|
||||
id: "2", title: "Renovations & Remodeling", author: "Transformation", description:
|
||||
"Transform outdated spaces into modern masterpieces. Full-scale renovations that honor original character while adding contemporary luxury.", tags: ["Renovation", "Modernization", "Design"],
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/dining-set-modern-luxury-dining-room_105762-1797.jpg?_wi=1",
|
||||
imageAlt: "Luxury home renovation",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/dining-set-modern-luxury-dining-room_105762-1797.jpg", imageAlt: "Luxury home renovation"},
|
||||
{
|
||||
id: "3",
|
||||
title: "Property Development",
|
||||
author: "Investment Ready",
|
||||
description:
|
||||
"End-to-end development services for investors and landowners. Strategic planning through project completion.",
|
||||
tags: ["Development", "Investment", "Commercial"],
|
||||
id: "3", title: "Property Development", author: "Investment Ready", description:
|
||||
"End-to-end development services for investors and landowners. Strategic planning through project completion.", tags: ["Development", "Investment", "Commercial"],
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/fututistic-cityscape_116348-92.jpg?_wi=1",
|
||||
imageAlt: "Commercial development",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/fututistic-cityscape_116348-92.jpg", imageAlt: "Commercial development"},
|
||||
{
|
||||
id: "4",
|
||||
title: "Architectural Planning",
|
||||
author: "Design Excellence",
|
||||
description:
|
||||
"Collaborative design services balancing beauty, functionality, and long-term value. Approved by leading architects.",
|
||||
tags: ["Design", "Planning", "Architecture"],
|
||||
id: "4", title: "Architectural Planning", author: "Design Excellence", description:
|
||||
"Collaborative design services balancing beauty, functionality, and long-term value. Approved by leading architects.", tags: ["Design", "Planning", "Architecture"],
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/architecture-concept-with-building-plans-copyspace_23-2147813102.jpg?_wi=1",
|
||||
imageAlt: "Architectural planning",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/architecture-concept-with-building-plans-copyspace_23-2147813102.jpg", imageAlt: "Architectural planning"},
|
||||
]}
|
||||
animationType="slide-up"
|
||||
title="Our Services"
|
||||
@@ -207,41 +157,17 @@ export default function HomePage() {
|
||||
<ProductCardFour
|
||||
products={[
|
||||
{
|
||||
id: "1",
|
||||
name: "Modern Luxury Villa",
|
||||
price: "$2.8M",
|
||||
variant: "Contemporary Design · Premium Materials",
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/luxurious-modern-villa-with-infinity-pool-lush-landscape_23-2152008242.jpg?_wi=2",
|
||||
imageAlt: "Modern luxury villa exterior",
|
||||
},
|
||||
id: "1", name: "Modern Luxury Villa", price: "$2.8M", variant: "Contemporary Design · Premium Materials", imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/luxurious-modern-villa-with-infinity-pool-lush-landscape_23-2152008242.jpg", imageAlt: "Modern luxury villa exterior"},
|
||||
{
|
||||
id: "2",
|
||||
name: "Contemporary Family Home",
|
||||
price: "$1.5M",
|
||||
variant: "Residential · Family-Focused",
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/modern-luxury-home-yellow-suburban-community-generated-by-ai_188544-29956.jpg?_wi=1",
|
||||
imageAlt: "Contemporary family home",
|
||||
},
|
||||
id: "2", name: "Contemporary Family Home", price: "$1.5M", variant: "Residential · Family-Focused", imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/modern-luxury-home-yellow-suburban-community-generated-by-ai_188544-29956.jpg", imageAlt: "Contemporary family home"},
|
||||
{
|
||||
id: "3",
|
||||
name: "High-End Renovation Project",
|
||||
price: "$850K",
|
||||
variant: "Full Renovation · Historic Property",
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/dining-set-modern-luxury-dining-room_105762-1797.jpg?_wi=2",
|
||||
imageAlt: "Luxury home renovation",
|
||||
},
|
||||
id: "3", name: "High-End Renovation Project", price: "$850K", variant: "Full Renovation · Historic Property", imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/dining-set-modern-luxury-dining-room_105762-1797.jpg", imageAlt: "Luxury home renovation"},
|
||||
{
|
||||
id: "4",
|
||||
name: "Commercial Development",
|
||||
price: "$4.2M",
|
||||
variant: "Mixed-Use · Investment Grade",
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/fututistic-cityscape_116348-92.jpg?_wi=2",
|
||||
imageAlt: "Commercial development",
|
||||
},
|
||||
id: "4", name: "Commercial Development", price: "$4.2M", variant: "Mixed-Use · Investment Grade", imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/fututistic-cityscape_116348-92.jpg", imageAlt: "Commercial development"},
|
||||
]}
|
||||
animationType="slide-up"
|
||||
gridVariant="uniform-all-items-equal"
|
||||
@@ -266,7 +192,7 @@ export default function HomePage() {
|
||||
{ value: "100%", title: "Client Satisfaction Rate" },
|
||||
{ value: "15+", title: "Years of Excellence" },
|
||||
]}
|
||||
imageSrc="http://img.b2bpic.net/free-photo/black-white-scene-showcasing-life-construction-workers-site_23-2151333281.jpg?_wi=1"
|
||||
imageSrc="http://img.b2bpic.net/free-photo/black-white-scene-showcasing-life-construction-workers-site_23-2151333281.jpg"
|
||||
imageAlt="Monarch construction team"
|
||||
mediaAnimation="slide-up"
|
||||
metricsAnimation="slide-up"
|
||||
@@ -278,33 +204,13 @@ export default function HomePage() {
|
||||
<MetricCardTen
|
||||
metrics={[
|
||||
{
|
||||
id: "1",
|
||||
title: "Consultation",
|
||||
subtitle: "Tell us your vision and discuss your dreams",
|
||||
category: "Discovery",
|
||||
value: "Step 1",
|
||||
},
|
||||
id: "1", title: "Consultation", subtitle: "Tell us your vision and discuss your dreams", category: "Discovery", value: "Step 1"},
|
||||
{
|
||||
id: "2",
|
||||
title: "Design & Planning",
|
||||
subtitle: "Architecture, engineering, and permit approvals",
|
||||
category: "Planning",
|
||||
value: "Step 2",
|
||||
},
|
||||
id: "2", title: "Design & Planning", subtitle: "Architecture, engineering, and permit approvals", category: "Planning", value: "Step 2"},
|
||||
{
|
||||
id: "3",
|
||||
title: "Build",
|
||||
subtitle: "Our expert team brings your project to life",
|
||||
category: "Execution",
|
||||
value: "Step 3",
|
||||
},
|
||||
id: "3", title: "Build", subtitle: "Our expert team brings your project to life", category: "Execution", value: "Step 3"},
|
||||
{
|
||||
id: "4",
|
||||
title: "Final Reveal",
|
||||
subtitle: "Your finished property, delivered flawlessly",
|
||||
category: "Completion",
|
||||
value: "Step 4",
|
||||
},
|
||||
id: "4", title: "Final Reveal", subtitle: "Your finished property, delivered flawlessly", category: "Completion", value: "Step 4"},
|
||||
]}
|
||||
title="Our Process"
|
||||
description="A streamlined, transparent approach to bringing your vision to life with precision and care"
|
||||
@@ -320,65 +226,29 @@ export default function HomePage() {
|
||||
<TestimonialCardOne
|
||||
testimonials={[
|
||||
{
|
||||
id: "1",
|
||||
name: "David Thompson",
|
||||
role: "Homeowner",
|
||||
company: "San Francisco, CA",
|
||||
rating: 5,
|
||||
id: "1", name: "David Thompson", role: "Homeowner", company: "San Francisco, CA", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/confident-businessman-posing-outside_74855-1551.jpg?_wi=2",
|
||||
imageAlt: "David Thompson",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/confident-businessman-posing-outside_74855-1551.jpg", imageAlt: "David Thompson"},
|
||||
{
|
||||
id: "2",
|
||||
name: "Jessica Lee",
|
||||
role: "Real Estate Developer",
|
||||
company: "Bay Area Development",
|
||||
rating: 5,
|
||||
id: "2", name: "Jessica Lee", role: "Real Estate Developer", company: "Bay Area Development", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/cheerful-young-businesswoman-smiling-camera_74855-4022.jpg?_wi=2",
|
||||
imageAlt: "Jessica Lee",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/cheerful-young-businesswoman-smiling-camera_74855-4022.jpg", imageAlt: "Jessica Lee"},
|
||||
{
|
||||
id: "3",
|
||||
name: "Robert Martinez",
|
||||
role: "Property Owner",
|
||||
company: "Peninsula Estates",
|
||||
rating: 5,
|
||||
id: "3", name: "Robert Martinez", role: "Property Owner", company: "Peninsula Estates", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/handsome-gay-official-suit-looking-camera-front-view-bearded-caucasian-man-smiling-camera-getting-dressed-wedding-ceremony-with-lover-lgbt-love-marriage-concept_74855-22937.jpg?_wi=2",
|
||||
imageAlt: "Robert Martinez",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/handsome-gay-official-suit-looking-camera-front-view-bearded-caucasian-man-smiling-camera-getting-dressed-wedding-ceremony-with-lover-lgbt-love-marriage-concept_74855-22937.jpg", imageAlt: "Robert Martinez"},
|
||||
{
|
||||
id: "4",
|
||||
name: "Amanda Wilson",
|
||||
role: "Interior Designer",
|
||||
company: "Luxury Interiors Co",
|
||||
rating: 5,
|
||||
id: "4", name: "Amanda Wilson", role: "Interior Designer", company: "Luxury Interiors Co", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/pretty-teacher-standing-white_114579-77731.jpg?_wi=1",
|
||||
imageAlt: "Amanda Wilson",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/pretty-teacher-standing-white_114579-77731.jpg", imageAlt: "Amanda Wilson"},
|
||||
{
|
||||
id: "5",
|
||||
name: "James Park",
|
||||
role: "Architect",
|
||||
company: "Park Architecture Studio",
|
||||
rating: 5,
|
||||
id: "5", name: "James Park", role: "Architect", company: "Park Architecture Studio", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/middle-aged-hispanic-business-person_23-2151098593.jpg?_wi=1",
|
||||
imageAlt: "James Park",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/middle-aged-hispanic-business-person_23-2151098593.jpg", imageAlt: "James Park"},
|
||||
{
|
||||
id: "6",
|
||||
name: "Catherine Brown",
|
||||
role: "Project Manager",
|
||||
company: "Cornerstone Development",
|
||||
rating: 5,
|
||||
id: "6", name: "Catherine Brown", role: "Project Manager", company: "Cornerstone Development", rating: 5,
|
||||
imageSrc:
|
||||
"http://img.b2bpic.net/free-photo/closeup-portrait-caucasian-happy-teacher-glasses_74855-9736.jpg?_wi=1",
|
||||
imageAlt: "Catherine Brown",
|
||||
},
|
||||
"http://img.b2bpic.net/free-photo/closeup-portrait-caucasian-happy-teacher-glasses_74855-9736.jpg", imageAlt: "Catherine Brown"},
|
||||
]}
|
||||
title="Client Testimonials"
|
||||
description="Hear directly from homeowners and developers about their Monarch experience"
|
||||
@@ -395,38 +265,18 @@ export default function HomePage() {
|
||||
<MetricCardTen
|
||||
metrics={[
|
||||
{
|
||||
id: "1",
|
||||
title: "15+ Years",
|
||||
subtitle: "Of Building Excellence",
|
||||
category: "Experience",
|
||||
value: "Established",
|
||||
},
|
||||
id: "1", title: "15+ Years", subtitle: "Of Building Excellence", category: "Experience", value: "Established"},
|
||||
{
|
||||
id: "2",
|
||||
title: "120+ Projects",
|
||||
subtitle: "Successfully Completed",
|
||||
category: "Portfolio",
|
||||
value: "Complete",
|
||||
},
|
||||
id: "2", title: "120+ Projects", subtitle: "Successfully Completed", category: "Portfolio", value: "Complete"},
|
||||
{
|
||||
id: "3",
|
||||
title: "100% Satisfaction",
|
||||
subtitle: "Client Satisfaction Rate",
|
||||
category: "Quality",
|
||||
value: "Certified",
|
||||
},
|
||||
id: "3", title: "100% Satisfaction", subtitle: "Client Satisfaction Rate", category: "Quality", value: "Certified"},
|
||||
{
|
||||
id: "4",
|
||||
title: "5-Star Reviews",
|
||||
subtitle: "Industry-Leading Ratings",
|
||||
category: "Reputation",
|
||||
value: "Trusted",
|
||||
},
|
||||
id: "4", title: "5-Star Reviews", subtitle: "Industry-Leading Ratings", category: "Reputation", value: "Trusted"},
|
||||
]}
|
||||
title="Our Track Record"
|
||||
description="Numbers that reflect our commitment to excellence and client satisfaction"
|
||||
tag="By The Numbers"
|
||||
textboxLayout="centered"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={false}
|
||||
animationType="slide-up"
|
||||
/>
|
||||
@@ -436,29 +286,17 @@ export default function HomePage() {
|
||||
<ContactFaq
|
||||
faqs={[
|
||||
{
|
||||
id: "1",
|
||||
title: "What areas do you serve?",
|
||||
content:
|
||||
"We serve the greater Bay Area including San Francisco, Peninsula, Marin County, and surrounding regions. We also undertake select projects in Northern California for premium clients.",
|
||||
},
|
||||
id: "1", title: "What areas do you serve?", content:
|
||||
"We serve the greater Bay Area including San Francisco, Peninsula, Marin County, and surrounding regions. We also undertake select projects in Northern California for premium clients."},
|
||||
{
|
||||
id: "2",
|
||||
title: "How long does a typical project take?",
|
||||
content:
|
||||
"Project timelines vary based on scope and complexity. Custom homes typically take 12-18 months from design through completion. Renovations range from 3-9 months depending on scale.",
|
||||
},
|
||||
id: "2", title: "How long does a typical project take?", content:
|
||||
"Project timelines vary based on scope and complexity. Custom homes typically take 12-18 months from design through completion. Renovations range from 3-9 months depending on scale."},
|
||||
{
|
||||
id: "3",
|
||||
title: "Do you offer financing options?",
|
||||
content:
|
||||
"We work with leading construction lenders and can provide referrals. We also offer flexible payment schedules aligned with project milestones.",
|
||||
},
|
||||
id: "3", title: "Do you offer financing options?", content:
|
||||
"We work with leading construction lenders and can provide referrals. We also offer flexible payment schedules aligned with project milestones."},
|
||||
{
|
||||
id: "4",
|
||||
title: "What's your warranty coverage?",
|
||||
content:
|
||||
"We provide comprehensive 10-year structural warranty plus extended coverage on all systems and finishes. Full details available upon consultation.",
|
||||
},
|
||||
id: "4", title: "What's your warranty coverage?", content:
|
||||
"We provide comprehensive 10-year structural warranty plus extended coverage on all systems and finishes. Full details available upon consultation."},
|
||||
]}
|
||||
ctaTitle="Ready to Build Something Extraordinary?"
|
||||
ctaDescription="Start your project with Monarch Builders & Developers today. Get expert guidance every step of the way."
|
||||
@@ -479,4 +317,4 @@ export default function HomePage() {
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,63 @@
|
||||
"use client";
|
||||
import React, { CSSProperties } from 'react';
|
||||
|
||||
import { memo } from "react";
|
||||
import useSvgTextLogo from "./useSvgTextLogo";
|
||||
import { cls } from "@/lib/utils";
|
||||
|
||||
interface SvgTextLogoProps {
|
||||
logoText: string;
|
||||
adjustHeightFactor?: number;
|
||||
verticalAlign?: "top" | "center";
|
||||
export interface SvgTextLogoProps {
|
||||
text: string;
|
||||
size?: 'small' | 'medium' | 'large';
|
||||
weight?: 'light' | 'normal' | 'bold';
|
||||
color?: string;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
}
|
||||
|
||||
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,
|
||||
size = 'medium',
|
||||
weight = 'normal',
|
||||
color = 'currentColor',
|
||||
className = '',
|
||||
style = {},
|
||||
}) => {
|
||||
const sizes = {
|
||||
small: { fontSize: '16px', height: '24px' },
|
||||
medium: { fontSize: '24px', height: '32px' },
|
||||
large: { fontSize: '32px', height: '48px' },
|
||||
};
|
||||
|
||||
const weights = {
|
||||
light: 300,
|
||||
normal: 400,
|
||||
bold: 700,
|
||||
};
|
||||
|
||||
const baselineOffset = '0.35em';
|
||||
|
||||
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 ${text.length * 20} 40`}
|
||||
className={className}
|
||||
style={{
|
||||
...sizes[size],
|
||||
...style,
|
||||
}}
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
>
|
||||
<text
|
||||
ref={textRef}
|
||||
x="0"
|
||||
y={verticalAlign === "center" ? "50%" : "0"}
|
||||
className="font-bold fill-current"
|
||||
x="50%"
|
||||
y="50%"
|
||||
dominantBaseline="middle"
|
||||
textAnchor="middle"
|
||||
fontSize={sizes[size].fontSize}
|
||||
fontWeight={weights[weight]}
|
||||
fill={color}
|
||||
style={{
|
||||
fontSize: "20px",
|
||||
letterSpacing: "-0.02em",
|
||||
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge"
|
||||
fontFamily: 'system-ui, -apple-system, sans-serif',
|
||||
userSelect: 'none',
|
||||
}}
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user