diff --git a/package-lock.json b/package-lock.json index f85cd87..888f23b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "redux-persist": "^6.0.0", "redux-persist-transform-encrypt": "^5.1.1", "uuid": "^10.0.0", + "vanilla-tilt": "^1.8.1", "xlsx": "^0.18.5", "yup": "^1.4.0" }, @@ -6233,6 +6234,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/vanilla-tilt": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/vanilla-tilt/-/vanilla-tilt-1.8.1.tgz", + "integrity": "sha512-hPB1XUsnh+SIeVSW2beb5RnuFxz4ZNgxjGD78o52F49gS4xaoLeEMh9qrQnJrnEn/vjjBI7IlxrrXmz4tGV0Kw==", + "license": "MIT" + }, "node_modules/vite": { "version": "5.2.9", "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz", diff --git a/package.json b/package.json index fc21f64..4c8b075 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "redux-persist": "^6.0.0", "redux-persist-transform-encrypt": "^5.1.1", "uuid": "^10.0.0", + "vanilla-tilt": "^1.8.1", "xlsx": "^0.18.5", "yup": "^1.4.0" }, diff --git a/src/Pages/Expenses/Expenses.jsx b/src/Pages/Expenses/Expenses.jsx index ac63c4d..a0ed7f4 100644 --- a/src/Pages/Expenses/Expenses.jsx +++ b/src/Pages/Expenses/Expenses.jsx @@ -1,12 +1,28 @@ import { Box, Button, HStack, Image, Text, VStack } from "@chakra-ui/react"; -import React from "react"; +import React, { useEffect, useRef } from "react"; // import MiniHeader from "../Components/MiniHeader"; import logo_card from "../../assets/logo_card.svg"; import TRANSCORP_LOGO from "../../assets/TRANSCORP_LOGO.svg"; import RuPay from '../../assets/rupayImg.png' import MiniHeader from "../../Components/MiniHeader"; +import VanillaTilt from "vanilla-tilt"; const Expenses = () => { + const tiltRef = useRef(null); + + useEffect(() => { + if (tiltRef.current) { + VanillaTilt.init(tiltRef.current, { + max: 15, + speed: 500, + scale:1.01, + glare: true, + "max-glare": 0.5, + }); + } + return () => tiltRef.current.vanillaTilt.destroy(); // Cleanup on unmount + }, []); + return ( { subTitle={"Lorem ipsum dolor sit amet, consectetur adipiscing elit."} /> - + + + - + @@ -73,7 +93,7 @@ const Expenses = () => { - +