opt-table
Version:
A Responsive and Customizable Rich Table
25 lines • 1.1 kB
JavaScript
import { Box, TableCell } from "@mui/material";
import { AnimatePresence, motion } from "framer-motion";
import React from "react";
function CollapseRowWrapper({ Comp, is_open, motion_key }) {
return (React.createElement(TableCell, { colSpan: 12, style: {
paddingBottom: 0,
paddingTop: 0,
width: "100%",
padding: 0,
} },
React.createElement(Box, { style: {
width: "100%",
padding: 0,
margin: 0,
overflow: "hidden",
} },
React.createElement(AnimatePresence, { mode: "wait" }, !!Comp && is_open && (React.createElement(motion.div, { key: motion_key, initial: { height: 0, opacity: 0, y: 24 }, animate: {
opacity: 1,
y: 0,
height: "fit-content",
// padding:"16px 8px"
}, exit: { opacity: 0, height: 0, y: 24, padding: 0 } }, Comp))))));
}
export default CollapseRowWrapper;
//# sourceMappingURL=collapse_detail_panel.js.map