Files
SSA-Admin-Panel/src/components/MainFrame.tsx

35 lines
917 B
TypeScript
Raw Normal View History

2025-02-10 12:06:34 +05:30
import { Box, VStack } from "@chakra-ui/react"
2025-01-15 12:38:29 +05:30
import { motion } from "framer-motion"
import React, { FC } from "react"
import { OPACITY_ON_LOAD } from "../Layouts/animations"
// ✅ Wrap Chakra components with Framer Motion
const MotionVStack = motion(VStack)
interface MainFrameProps {
children: React.ReactNode
title?: string
2025-02-12 13:18:18 +05:30
transperant?:boolean
2025-01-15 12:38:29 +05:30
}
2025-02-12 13:18:18 +05:30
const MainFrame: FC<MainFrameProps> = ({ children, transperant }) => {
2025-01-15 12:38:29 +05:30
return (
2025-02-12 16:27:49 +05:30
<MotionVStack overflow={'auto'} {...OPACITY_ON_LOAD} w="100%" minH="93%" pe={2} ps={1.5} pt={1} pb={2}>
2025-01-15 12:38:29 +05:30
<Box
w="100%"
2025-02-12 16:27:49 +05:30
// minH="100%"
2025-02-12 13:18:18 +05:30
bg={transperant?'transperant':"#ffffff"}
2025-02-12 16:27:49 +05:30
// overflow={'scroll'}
2025-02-11 13:53:51 +05:30
rounded="lg"
2025-02-12 13:18:18 +05:30
boxShadow={transperant?'none':'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'}
pt={transperant?0:3}
2025-02-12 11:54:21 +05:30
2025-01-15 12:38:29 +05:30
>
{children}
</Box>
</MotionVStack>
)
}
export default MainFrame