added settings tab transitions

This commit is contained in:
SrGooglo 2024-09-11 11:44:43 +00:00
parent 5a6f61b9aa
commit d4c4031cec
2 changed files with 29 additions and 5 deletions

View File

@ -0,0 +1,19 @@
import React from "react"
import { motion, AnimatePresence } from "framer-motion"
const PageTransition = (props) => {
return <AnimatePresence>
<motion.div
layout
initial={{ y: 10, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
exit={{ y: -10, opacity: 0 }}
transition={{ duration: 0.2 }}
{...props}
>
{props.children}
</motion.div>
</AnimatePresence>
}
export default PageTransition

View File

@ -2,6 +2,7 @@ import React from "react"
import * as antd from "antd"
import { Translation } from "react-i18next"
import PageTransition from "@components/PageTransition"
import { createIconRender } from "@components/Icons"
import config from "@config"
@ -146,10 +147,14 @@ export default () => {
/>
</div>
<div className="settings_content">
{
loading && <antd.Skeleton active />
}
{
loading && <antd.Skeleton active />
}
<PageTransition
className="settings_content"
key={activeKey}
>
{
!loading && <SettingTab
baseConfig={config}
@ -158,6 +163,6 @@ export default () => {
withGroups
/>
}
</div>
</PageTransition>
</div>
}