avent-ui
Version:
The best UI library for Typescript and React
28 lines (25 loc) • 1.02 kB
JavaScript
import { jsx } from 'react/jsx-runtime';
import React, { forwardRef } from 'react';
const HamMenuSubContent = forwardRef((props, ref) => {
const { children, as, className, style, animateDelay, motionProp, ...otherProps } = props;
const Component = as || 'div';
const footerLinkPop = motionProp || {
initial: {
opacity: 0,
transition: { duration: 1 }
},
enter: (i) => ({
opacity: 100,
transition: { duration: 2, delay: i * (animateDelay || 0.3) }
}),
exit: {
opacity: 0,
transition: { duration: 0.5 },
}
};
return (jsx(Component, { ref: ref, style: style, className: `flex gap-4 flex-wrap justify-center ${className}`, ...otherProps, children: React.Children.map(children, (child, index) => {
return (child && React.cloneElement(child, { index, footerLinkPop }));
}) }));
});
export { HamMenuSubContent as default };
//# sourceMappingURL=hammenu-subcontent.js.map