1 parent 9779f0d commit c22067eCopy full SHA for c22067e
2 files changed
src/components/card.tsx
@@ -14,9 +14,10 @@ interface Props {
14
x: number
15
y: number
16
children: React.ReactNode
17
+ enterScale?: number
18
}
19
-export default function Card({ children, order, width, height, x, y, className }: Props) {
20
+export default function Card({ children, order, width, height, x, y, className, enterScale = 0.6 }: Props) {
21
const { maxSM, init } = useSize()
22
let [show, setShow] = useState(false)
23
if (maxSM && init) order = 0
@@ -36,7 +37,7 @@ export default function Card({ children, order, width, height, x, y, className }
36
37
return (
38
<motion.div
39
className={cn('card squircle', className)}
- initial={{ opacity: 0, scale: 0.6, left: x, top: y, width, height }}
40
+ initial={{ opacity: 0, scale: enterScale, left: x, top: y, width, height }}
41
animate={{ opacity: 1, scale: 1, left: x, top: y, width, height }}
42
whileHover={{ scale: 1.05 }}
43
whileTap={{ scale: 0.95 }}>
src/components/nav-card.tsx
@@ -198,6 +198,7 @@ export default function NavCard() {
198
height={size.height}
199
x={position.x}
200
y={position.y}
201
+ enterScale={form === 'icons' ? 1 : 0.6}
202
className={clsx(form === 'mini' && 'overflow-hidden p-3', form === 'icons' && 'overflow-visible flex items-center gap-2 px-4 py-2 sm:gap-4', form === 'full' && 'p-6')}>
203
{form === 'full' && siteContent.enableChristmas && (
204
<>
0 commit comments