Update src/components/Textbox.tsx
This commit is contained in:
@@ -15,13 +15,13 @@ import type { ButtonConfig } from "@/types/button";
|
|||||||
import type { Avatar } from "./shared/AvatarGroup";
|
import type { Avatar } from "./shared/AvatarGroup";
|
||||||
import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
|
import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants";
|
||||||
|
|
||||||
type TitleSegment =
|
type Elevate Your Brand with Expert Copywriting and Content EnhancementSegment =
|
||||||
| { type: "text"; content: string }
|
| { type: "text"; content: string }
|
||||||
| { type: "image"; src: string; alt?: string };
|
| { type: "image"; src: string; alt?: string };
|
||||||
|
|
||||||
interface TextBoxProps {
|
interface TextBoxProps {
|
||||||
title: string;
|
title: string;
|
||||||
titleSegments?: TitleSegment[];
|
titleSegments?: Elevate Your Brand with Expert Copywriting and Content EnhancementSegment[];
|
||||||
description: string;
|
description: string;
|
||||||
type?: AnimationType;
|
type?: AnimationType;
|
||||||
textboxLayout?: TextboxLayout;
|
textboxLayout?: TextboxLayout;
|
||||||
@@ -114,7 +114,7 @@ const TextBox = ({
|
|||||||
), [type, theme.defaultTextAnimation, title, textboxLayout, center, useInvertedBackground, titleClassName, duration, start, end, gradientColors]);
|
), [type, theme.defaultTextAnimation, title, textboxLayout, center, useInvertedBackground, titleClassName, duration, start, end, gradientColors]);
|
||||||
|
|
||||||
// Inline image title component (used when textboxLayout === "inline-image")
|
// Inline image title component (used when textboxLayout === "inline-image")
|
||||||
const inlineImageTitleElement = useMemo(() => titleSegments && titleSegments.length > 0 ? (
|
const inlineImageElevate Your Brand with Expert Copywriting and Content EnhancementElement = useMemo(() => titleSegments && titleSegments.length > 0 ? (
|
||||||
<h2
|
<h2
|
||||||
className={cls(
|
className={cls(
|
||||||
"text-4xl md:text-5xl font-medium text-center leading-[1.15] text-balance",
|
"text-4xl md:text-5xl font-medium text-center leading-[1.15] text-balance",
|
||||||
@@ -267,7 +267,7 @@ const TextBox = ({
|
|||||||
if (textboxLayout === "inline-image") {
|
if (textboxLayout === "inline-image") {
|
||||||
return (
|
return (
|
||||||
<div className={cls("flex flex-col gap-3 md:gap-1", center && "items-center text-center", className)}>
|
<div className={cls("flex flex-col gap-3 md:gap-1", center && "items-center text-center", className)}>
|
||||||
{inlineImageTitleElement}
|
{inlineImageElevate Your Brand with Expert Copywriting and Content EnhancementElement}
|
||||||
{actionsElement}
|
{actionsElement}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user