Merge version_3 into main #3

Open
bender wants to merge 2 commits from version_3 into main
2 changed files with 27 additions and 43 deletions

View File

@@ -10,15 +10,15 @@
--accent: #ffffff;
--background-accent: #ffffff; */
--background: #ffffff;
--card: #f9f9f9;
--foreground: #000f06e6;
--primary-cta: #0a7039;
--background: #e8f1f5;
--card: #d9e8f0;
--foreground: #1a3a4d;
--primary-cta: #8b6f47;
--primary-cta-text: #ffffff;
--secondary-cta: #f9f9f9;
--secondary-cta: #d4e5ed;
--secondary-cta-text: #000f06e6;
--accent: #e2e2e2;
--background-accent: #c4c4c4;
--accent: #a8c5d6;
--background-accent: #6b4423;
/* text sizing - set by ThemeProvider */
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);

View File

@@ -1,51 +1,35 @@
"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;
textClassName?: string;
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'mathematical';
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
textClassName = '',
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 200 60"
className={`w-auto h-8 ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<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={`text-lg font-bold fill-current ${textClassName}`}
>
{logoText}
{text}
</text>
</svg>
);
});
SvgTextLogo.displayName = "SvgTextLogo";
};
export default SvgTextLogo;