feat: faster animation

This commit is contained in:
DIYgod
2024-04-29 17:24:37 +08:00
parent b33e76181b
commit c601cf4e78
3 changed files with 7 additions and 16 deletions
@@ -57,14 +57,9 @@ export function EntryColumn({
{entries.data?.pages?.map((page, index) => (
<m.div
key={`${activedList?.level}-${activedList?.id}-${index}`}
transition={{
type: "tween",
duration: 0.1,
ease: "easeInOut",
}}
initial={{ opacity: 0 }}
initial={{ opacity: 0.01 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
exit={{ opacity: 0.01 }}
className={cn(
activedList?.view &&
gridMode.includes(activedList.view) &&
@@ -104,15 +104,10 @@ function FeedCategory({
<AnimatePresence>
{open && (
<m.div
transition={{
type: "tween",
duration: 0.1,
ease: "easeInOut",
}}
className="overflow-hidden"
initial={{
height: 0,
opacity: 0,
opacity: 0.01,
}}
animate={{
height: "auto",
@@ -120,7 +115,7 @@ function FeedCategory({
}}
exit={{
height: 0,
opacity: 0,
opacity: 0.01,
}}
>
{data.list.map((feed) => (
+3 -2
View File
@@ -66,8 +66,9 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<LazyMotion features={loadFeatures} strict key="framer">
<MotionConfig
transition={{
type: "spring",
duration: 0.3,
type: "tween",
duration: 0.1,
ease: "easeInOut",
}}
>
<SessionProvider>