@frontify/fondue
Version:
Design system of Frontify
36 lines (35 loc) • 899 B
JavaScript
import { jsx as i } from "react/jsx-runtime";
import { AnimatePresence as n, motion as s } from "framer-motion";
const p = ({
children: e,
isOpen: a = !1,
preventInitialAnimation: o = !1,
animateOpacity: t = !0,
"data-test-id": l = "collapsible-wrap"
}) => /* @__PURE__ */ i(n, { initial: o ? !1 : void 0, children: a && e && /* @__PURE__ */ i(
s.div,
{
initial: "collapsed",
animate: "open",
exit: "collapsed",
variants: {
open: {
height: "auto",
overflow: "hidden",
opacity: 1,
transitionEnd: {
overflow: "visible"
}
},
collapsed: { height: 0, overflow: "hidden", opacity: t ? 0 : 1 }
},
transition: { type: "tween" },
"data-test-id": l,
children: e
}
) });
p.displayName = "FondueCollapsibleWrap";
export {
p as CollapsibleWrap
};
//# sourceMappingURL=CollapsibleWrap.es.js.map