"use client"; import TextAnimation from "@/components/text/TextAnimation"; import Tag from "@/components/shared/Tag"; 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"; import type { LucideIcon } from "lucide-react"; interface TextAboutProps { tag?: string; tagIcon?: LucideIcon; tagAnimation?: ButtonAnimationType; title: string; buttons?: ButtonConfig[]; buttonAnimation?: ButtonAnimationType; useInvertedBackground: boolean; ariaLabel?: string; className?: string; containerClassName?: string; titleClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; } const TextAbout = ({ tag, tagIcon, tagAnimation = "none", title, buttons, buttonAnimation = "none", useInvertedBackground, ariaLabel = "About section", className = "", containerClassName = "", titleClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", }: TextAboutProps) => { const theme = useTheme(); const { containerRef: tagContainerRef } = useButtonAnimation({ animationType: tagAnimation }); const { containerRef: buttonContainerRef } = useButtonAnimation({ animationType: buttonAnimation }); return (
{tag && (
)} {buttons && buttons.length > 0 && (
{buttons.slice(0, 2).map((button, index) => (
)}
); }; TextAbout.displayName = "TextAbout"; export default TextAbout;