diff --git a/src/components/system/AnimateView/AnimateView.tsx b/src/components/system/AnimateView/AnimateView.tsx new file mode 100644 index 0000000..8dd60be --- /dev/null +++ b/src/components/system/AnimateView/AnimateView.tsx @@ -0,0 +1,19 @@ +import type { HTMLMotionProps } from 'framer-motion' +import { AnimatePresence, motion } from 'framer-motion' + +export interface AnimateViewProps extends HTMLMotionProps<'main'> { + condition: boolean + children: React.ReactNode +} + +export const AnimateView: React.FC = ({ condition, children, ...rest }) => { + return ( + + {condition && ( + + {children} + + )} + + ) +} diff --git a/src/components/system/AnimateView/index.ts b/src/components/system/AnimateView/index.ts new file mode 100644 index 0000000..5e1c5cb --- /dev/null +++ b/src/components/system/AnimateView/index.ts @@ -0,0 +1 @@ +export * from './AnimateView'