"use client"; import TextAnimation from "@/components/text/TextAnimation"; import Button from "@/components/button/Button"; import { cls } from "@/lib/utils"; import { getButtonProps } from "@/lib/buttonUtils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import { useButtonAnimation } from "@/components/hooks/useButtonAnimation"; import type { ButtonConfig, ButtonAnimationType } from "@/types/button"; interface TextSplitAboutProps { title: string; description: string[]; buttons?: ButtonConfig[]; buttonAnimation?: ButtonAnimationType; showBorder?: boolean; useInvertedBackground: boolean; ariaLabel?: string; className?: string; containerClassName?: string; titleClassName?: string; descriptionClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; } const TextSplitAbout = ({ title, description, buttons, buttonAnimation = "none", showBorder = false, useInvertedBackground, ariaLabel = "About section", className = "", containerClassName = "", titleClassName = "", descriptionClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", }: TextSplitAboutProps) => { const theme = useTheme(); const { containerRef: buttonContainerRef } = useButtonAnimation({ animationType: buttonAnimation }); return (
{description.map((desc, index) => ( ))} {buttons && buttons.length > 0 && (
{buttons.slice(0, 2).map((button, index) => (
)}
{showBorder &&
}
); }; TextSplitAbout.displayName = "TextSplitAbout"; export default TextSplitAbout;