import { Container, SimpleGrid, Image, Flex, Heading, Text, Stack, StackDivider, Icon, useColorModeValue, Button, Center, useBreakpointValue, } from "@chakra-ui/react"; // import Xarrow, { useXarrow } from "react-xarrows"; import React, { useContext } from "react"; import UIContext from "../core/providers/UIProvider/context"; const Feature = ({ text, icon, iconBg, bullets }) => { return ( {icon} {text} {bullets?.length > 0 && ( {bullets.map((bullet, idx) => { return ( } /> ); })} )} ); }; const SplitWithImage = ({ badge, title, body, bullets, colorScheme, imgURL, mirror, elementName, cta, }) => { const buttonSize = useBreakpointValue({ base: "md", sm: "md", md: "md", lg: "lg", xl: "xl", "2xl": "xl", }); const ui = useContext(UIContext); const [isVisible, setVisible] = React.useState(true); const domRef = React.useRef(); React.useEffect(() => { const observer = new IntersectionObserver((entries) => { entries.forEach((entry) => setVisible(entry.isIntersecting)); }); observer.observe(domRef.current); const current = domRef.current; return () => observer.unobserve(current); }, []); return ( {mirror && !ui.isMobileView && ( {"feature )} {badge} {title} {body} } > {bullets?.map((bullet, idx) => { return ( } iconBg={bullet.bgColor} text={bullet.text} bullets={bullet?.bullets} /> ); })}
{(!mirror || ui.isMobileView) && ( {"feature )}
); }; export default SplitWithImage;