首页页头样式优化

This commit is contained in:
2025-03-13 15:14:30 +08:00
parent e592137370
commit e1ca9bfff0
25 changed files with 565 additions and 141 deletions

View File

@@ -0,0 +1,27 @@
import { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
export const Dropdown = () => {
const [isOpen, setIsOpen] = useState(false);
return (
<div>
<button onClick={() => setIsOpen(!isOpen)}>
</button>
<AnimatePresence>
{isOpen && (
<motion.div
initial={{ opacity: 0, y: -10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -10 }}
transition={{ duration: 0.2 }}
>
{/* 菜单内容 */}
</motion.div>
)}
</AnimatePresence>
</div>
);
};

View File

@@ -7,7 +7,7 @@ export type WrapProps = {
export default function Wrap(props: WrapProps) {
return (
<div className={`max-w-[1232px] px-4 mx-auto ${props.className}`}>
<div className={`max-w-[1232px] w-full px-4 mx-auto ${props.className}`}>
{props.children}
</div>
)