From c4c805c83b5dca7ede74029ec8094f82fa30bbee Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 28 Dec 2024 18:25:16 -0600 Subject: [PATCH] tune index/projects Dots animation fading --- src/components/AppWrapper.tsx | 4 +++- src/components/Dots.tsx | 14 ++++++++++++-- src/pages/index.tsx | 2 +- src/pages/projects.tsx | 12 ++++++------ tailwind.config.cjs | 6 ++---- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/components/AppWrapper.tsx b/src/components/AppWrapper.tsx index 36a56a3..e4d2edb 100644 --- a/src/components/AppWrapper.tsx +++ b/src/components/AppWrapper.tsx @@ -4,6 +4,7 @@ import type { FunctionComponent, ReactNode } from "react"; type WrapperProps = { className?: string; + dotsClassName?: string; children?: ReactNode; }; @@ -15,6 +16,7 @@ const DotsDynamic = dynamic( const AppWrapper: FunctionComponent = ({ children, className, + dotsClassName, }: WrapperProps) => { return (
= ({ className, )} > - + {children}
); diff --git a/src/components/Dots.tsx b/src/components/Dots.tsx index 4011f8f..d9ccdd5 100644 --- a/src/components/Dots.tsx +++ b/src/components/Dots.tsx @@ -1,7 +1,14 @@ +import { cn } from '@/utils/helpers'; import { p5i, P5I } from 'p5i'; import React, { useEffect, useRef } from 'react'; -const Dots: React.FC = () => { +interface DotsProps { + className?: string; +} + +const Dots = ({ + className, +}: DotsProps) => { const canvasRef = useRef(null); const { @@ -103,7 +110,10 @@ const Dots: React.FC = () => { }; }, []); - return
; + return
; }; export default Dots; \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx index fa49e7e..7cbca40 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -46,7 +46,7 @@ const Home: NextPage = ({ - +