Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fade up animation #702

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@testing-library/user-event": "^14.5.2",
"axios": "^1.7.3",
"firebase": "^10.12.4",
"framer-motion": "^11.3.24",
"lottie-react": "^2.4.0",
"mdn-data": "^2.9.0",
"react": "^18.0.0",
Expand Down
15 changes: 12 additions & 3 deletions src/Components/Contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import { Link } from "react-router-dom";
import homeIcon from '../img/homeicon.png';
import axios from 'axios';
import './Contributors.css';
import { color, motion } from "framer-motion";

function Contributors() {
const [contributors, setContributors] = useState([]);

const eventVariants = {
hidden: { opacity: 0, y: 40 },
visible: { opacity: 1, y: 0 },
};
useEffect(() => {
async function fetchContributors() {
try {
Expand All @@ -30,7 +34,12 @@ function Contributors() {
</Link>
<div className="contributors-grid">
{contributors.map((contributor) => (
<div key={contributor.id} className="contributor-card">
<motion.div initial="hidden"
whileInView="visible"
whileHover={{ scale: 1.06 }}
viewport={{ once: true }}
variants={eventVariants}
transition={{ duration: 0.2, ease: "easeInOut" }} key={contributor.id} className="contributor-card">
<a
href={contributor.html_url}
className="contributor-link"
Expand All @@ -47,7 +56,7 @@ function Contributors() {
<p className="contributor-contributions">
Contributions: {contributor.contributions}
</p>
</div>
</motion.div>
))}
</div>
</div>
Expand Down