mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
added settings tab transitions
This commit is contained in:
parent
5a6f61b9aa
commit
d4c4031cec
19
packages/app/src/components/PageTransition/index.jsx
Normal file
19
packages/app/src/components/PageTransition/index.jsx
Normal 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
|
@ -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>
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user