Merge version_1 into main #2
@@ -20,11 +20,11 @@ const navItems = [
|
||||
const pizzaProducts = [
|
||||
{
|
||||
id: "1", brand: "Teddy's Classic", name: "Classic Pepperoni", price: "Large", rating: 5,
|
||||
reviewCount: "950+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-delicious-cooked-pizza-with-different-seasonings-dark-blue-desk_140725-80918.jpg?_wi=1", imageAlt: "Classic Pepperoni Pizza"
|
||||
reviewCount: "950+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-delicious-cooked-pizza-with-different-seasonings-dark-blue-desk_140725-80918.jpg", imageAlt: "Classic Pepperoni Pizza"
|
||||
},
|
||||
{
|
||||
id: "2", brand: "Teddy's Premium", name: "Cheese Deluxe", price: "Large", rating: 5,
|
||||
reviewCount: "880+", imageSrc: "http://img.b2bpic.net/free-photo/sliced-pizza-with-mushrooms-cheese_140725-7058.jpg?_wi=1", imageAlt: "Cheese Deluxe Pizza"
|
||||
reviewCount: "880+", imageSrc: "http://img.b2bpic.net/free-photo/sliced-pizza-with-mushrooms-cheese_140725-7058.jpg", imageAlt: "Cheese Deluxe Pizza"
|
||||
},
|
||||
{
|
||||
id: "3", brand: "Teddy's Favorite", name: "Sausage & Mushroom", price: "Large", rating: 5,
|
||||
@@ -110,7 +110,7 @@ export default function LandingPage() {
|
||||
borderRadius="rounded"
|
||||
contentWidth="compact"
|
||||
sizing="largeSmall"
|
||||
background="circleGradient"
|
||||
background="none"
|
||||
cardStyle="layered-gradient"
|
||||
primaryButtonStyle="diagonal-gradient"
|
||||
secondaryButtonStyle="glass"
|
||||
@@ -127,16 +127,16 @@ export default function LandingPage() {
|
||||
tag="Family Favorite"
|
||||
tagIcon={Heart}
|
||||
tagAnimation="slide-up"
|
||||
background={{ variant: "circleGradient" }}
|
||||
background={{ variant: "plain" }}
|
||||
mediaItems={[
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/vertical-shot-delicious-cheesy-pepperoni-pizza-inside-brick-stone-oven_181624-58518.jpg", imageAlt: "Fresh hand-tossed pizza with melted cheese"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-delicious-cooked-pizza-with-different-seasonings-dark-blue-desk_140725-80918.jpg?_wi=2", imageAlt: "Classic Pepperoni Pizza"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-delicious-cooked-pizza-with-different-seasonings-dark-blue-desk_140725-80918.jpg", imageAlt: "Classic Pepperoni Pizza"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/sliced-pizza-with-mushrooms-cheese_140725-7058.jpg?_wi=2", imageAlt: "Cheese Deluxe Pizza"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/sliced-pizza-with-mushrooms-cheese_140725-7058.jpg", imageAlt: "Cheese Deluxe Pizza"
|
||||
}
|
||||
]}
|
||||
buttons={[
|
||||
|
||||
@@ -1,51 +1,45 @@
|
||||
"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;
|
||||
fill?: string;
|
||||
fontFamily?: string;
|
||||
letterSpacing?: number;
|
||||
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'baseline' | 'ideographic' | 'mathematical';
|
||||
}
|
||||
|
||||
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,
|
||||
fill = 'currentColor',
|
||||
fontFamily = 'Arial, sans-serif',
|
||||
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`}
|
||||
className={className}
|
||||
viewBox="0 0 300 100"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
>
|
||||
<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%"
|
||||
fontSize={fontSize}
|
||||
fill={fill}
|
||||
fontFamily={fontFamily}
|
||||
letterSpacing={letterSpacing}
|
||||
dominantBaseline={dominantBaseline}
|
||||
textAnchor="middle"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user