feat: unify code-like components with shared CodeWindow, fix blog re-render loop, and stabilize layouts
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Failing after 1m2s
Build & Deploy / 🏗️ Build (push) Failing after 3m44s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Failing after 1m2s
Build & Deploy / 🏗️ Build (push) Failing after 3m44s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -19,8 +19,8 @@ export const Reveal: React.FC<RevealProps> = ({
|
||||
delay = 0.25,
|
||||
className = "",
|
||||
direction = "up",
|
||||
scale = 1,
|
||||
blur = false,
|
||||
scale = 0.98,
|
||||
blur = true,
|
||||
}) => {
|
||||
const ref = useRef(null);
|
||||
const isInView = useInView(ref, { once: true, margin: "-10%" });
|
||||
@@ -35,15 +35,17 @@ export const Reveal: React.FC<RevealProps> = ({
|
||||
const variants: Variants = {
|
||||
hidden: {
|
||||
opacity: 0,
|
||||
y: direction === "up" ? 10 : direction === "down" ? -10 : 0,
|
||||
x: direction === "left" ? 10 : direction === "right" ? -10 : 0,
|
||||
y: direction === "up" ? 15 : direction === "down" ? -15 : 0,
|
||||
x: direction === "left" ? 15 : direction === "right" ? -15 : 0,
|
||||
scale: scale !== 1 ? scale : 1,
|
||||
filter: blur ? "blur(4px)" : "none",
|
||||
},
|
||||
visible: {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
x: 0,
|
||||
scale: 1,
|
||||
filter: "none",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user