Skip to content

Commit

Permalink
feat: data aos
Browse files Browse the repository at this point in the history
  • Loading branch information
faisallbhr committed May 23, 2024
1 parent b6beaf2 commit 51c3500
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
33 changes: 33 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"preview": "vite preview"
},
"dependencies": {
"aos": "^2.3.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.2.1"
},
"devDependencies": {
"@types/aos": "^3.0.7",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
Expand Down
11 changes: 11 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@ import Benefit from "./components/Benefit";
import FAQ from "./components/FAQ";
import Jumbotron from "./components/Jumbotron";
import Footer from "./components/Footer";
import { useEffect } from "react";
import AOS from "aos";
import "aos/dist/aos.css";

function App() {
useEffect(() => {
AOS.init({
offset: 80,
duration: 300,
once: true,
easing: "ease-out",
});
}, []);
return (
<main className="antialiased">
<Header />
Expand Down
1 change: 1 addition & 0 deletions src/components/Benefit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const Benefit = () => {
{BENEFIT_ITEM.map((item) => (
<div
key={item.title}
data-aos="fade-up"
className="bg-gradient-to-tr from-primary to-secondary rounded-md p-1 shadow-xl">
<div className="flex flex-col justify-start items-center bg-white rounded-md p-4 max-w-80 w-full h-full">
<div className="bg-gradient-to-tr from-primary to-secondary rounded-full p-1">
Expand Down
2 changes: 1 addition & 1 deletion src/components/FAQ/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Accordion = ({
const [isOpen, setIsOpen] = useState(false);

return (
<div className="shadow-xl rounded-md overflow-hidden">
<div data-aos="fade-up" className="shadow-xl rounded-md overflow-hidden">
<button
onClick={() => setIsOpen(!isOpen)}
className="p-4 flex justify-between w-full items-center relative duration-300 bg-primary">
Expand Down

0 comments on commit 51c3500

Please sign in to comment.