Skip to content

Commit

Permalink
FIxed Z-Index issue in Merch Popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahan-Daksh committed Aug 11, 2024
1 parent a965558 commit 2e6141b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export default function MainPage() {
</AnimatedBackground>
</div>

<AnimatedBackground isActive={activeSegment === 2}>
<AnimatedBackground isActive={activeSegment === 2} style={{ zIndex: -1 }}>
<Partners />
</AnimatedBackground>

<AnimatedBackground isActive={activeSegment === 3}>
<AnimatedBackground isActive={activeSegment === 3} style={{ zIndex: -1 }}>
<Contact />
</AnimatedBackground>

Expand Down
3 changes: 2 additions & 1 deletion src/utils/AnimatedBackground.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
import { motion } from "framer-motion";
import "../assets/styles/utils/AnimatedBackground.css";

const AnimatedBackground = ({ children, isActive }) => {
const AnimatedBackground = ({ children, isActive, style }) => {
const [animationClass, setAnimationClass] = useState("");

useEffect(() => {
Expand All @@ -16,6 +16,7 @@ const AnimatedBackground = ({ children, isActive }) => {
return (
<motion.div
className={`animated-background-container ${animationClass}`}
style={style}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
Expand Down
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export default {
3: "3",
4: "4",
5: "5",
'custom-z': '100000',
'low-z':'1000'
},
borderWidth: {
DEFAULT: "0.0625rem",
Expand Down

0 comments on commit 2e6141b

Please sign in to comment.