From 5ac1972341bba3005d4183623b524a9b45454e23 Mon Sep 17 00:00:00 2001 From: Daniel Fjeldstad <45217974+w3bdesign@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:27:17 +0100 Subject: [PATCH] Add Jsdoc to MatrixCursor component Fixes #477 Add Jsdoc comments to the `MatrixCursor` function declaration in `src/components/Animations/MatrixCursor.component.tsx`. * Add Jsdoc comment for `MatrixCursor` function declaration * Include descriptions for the function, parameters, and return type --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/w3bdesign/dfweb-v4/issues/477?shareId=XXXX-XXXX-XXXX-XXXX). --- src/components/Animations/MatrixCursor.component.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Animations/MatrixCursor.component.tsx b/src/components/Animations/MatrixCursor.component.tsx index 9e853c0d..3e63c27b 100644 --- a/src/components/Animations/MatrixCursor.component.tsx +++ b/src/components/Animations/MatrixCursor.component.tsx @@ -19,6 +19,12 @@ interface MatrixTrail { char: string; } +/** + * MatrixCursor component that renders a custom cursor with a matrix trail effect + * @param {MatrixCursorProps} props - The props for the MatrixCursor component + * @param {RefObject} props.heroRef - Reference to the hero section element + * @returns {JSX.Element | null} The rendered MatrixCursor component or null if heroRef is not available + */ const MatrixCursor = ({ heroRef }: MatrixCursorProps) => { const [cursorPosition, setCursorPosition] = useState({ x: 0, y: 0 }); const [isHovered, setIsHovered] = useState(false);