Merge version_1 into main #1
@@ -128,6 +128,9 @@ export default function LandingPage() {
|
||||
tag="Partners"
|
||||
tagIcon={Users}
|
||||
tagAnimation="slide-up"
|
||||
names={[
|
||||
"Bloomberg", "Reuters", "Financial Times", "CNBC", "Bloomberg Quint", "Saxo Bank", "Interactive Brokers"
|
||||
]}
|
||||
logos={[
|
||||
"http://img.b2bpic.net/free-vector/creative-data-logo-template_23-2149213542.jpg", "http://img.b2bpic.net/free-vector/gradient-breaking-news-logo-design_23-2151172866.jpg", "http://img.b2bpic.net/free-vector/colorful-latest-news-banners_23-2148153499.jpg", "http://img.b2bpic.net/free-photo/medium-shot-woman-working-office-travel-agency_23-2150433339.jpg", "http://img.b2bpic.net/free-vector/logo-with-circular-shapes_1071-115.jpg", "http://img.b2bpic.net/free-vector/black-business-card-with-colorful-lines_23-2147507712.jpg", "http://img.b2bpic.net/free-vector/abstract-logo-template_1071-68.jpg"
|
||||
]}
|
||||
|
||||
@@ -1,51 +1,44 @@
|
||||
"use client";
|
||||
|
||||
import { memo } from "react";
|
||||
import useSvgTextLogo from "./useSvgTextLogo";
|
||||
import { cls } from "@/lib/utils";
|
||||
import React, { CSSProperties } from "react";
|
||||
|
||||
interface SvgTextLogoProps {
|
||||
logoText: string;
|
||||
adjustHeightFactor?: number;
|
||||
verticalAlign?: "top" | "center";
|
||||
text: string;
|
||||
className?: string;
|
||||
style?: CSSProperties;
|
||||
fontSize?: number;
|
||||
fontWeight?: number | string;
|
||||
fill?: string;
|
||||
strokeWidth?: number;
|
||||
stroke?: string;
|
||||
}
|
||||
|
||||
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 = "", style,
|
||||
fontSize = 32,
|
||||
fontWeight = "bold", fill = "currentColor", strokeWidth = 0,
|
||||
stroke = "none"}) => {
|
||||
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 * fontSize} ${fontSize + 20}`}
|
||||
className={className}
|
||||
style={style}
|
||||
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"
|
||||
}}
|
||||
y={fontSize}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
fill={fill}
|
||||
stroke={stroke}
|
||||
strokeWidth={strokeWidth}
|
||||
dominantBaseline="middle"
|
||||
textAnchor="start"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user