import { motion } from "framer-motion"; import { forwardRef } from "react"; export const Circle = forwardRef((props: any, ref) => { const { shape } = props; const GradientType = shape?.gradient?.type === "radialGradient" ? "radialGradient" : "linearGradient"; return ( {shape?.image?.enabled && shape?.image?.urls?.length > 0 && ( )} {shape?.gradient?.enabled ? ( <> {shape?.gradient?.colours?.map((color: any, c: number) => ( ))} ) : ( )} {shape?.transparency && props?.children && props.children} 0 ? shape?.border?.width / 2 : 0) } cy={ 151.5 - (shape?.border?.width > 0 ? shape?.border?.width / 2 : 0) } r={ 151.5 - (shape?.border?.width > 0 ? shape?.border?.width / 2 : 0) } animate={{ x: shape?.border?.width > 0 ? shape?.border?.width / 2 : 0, y: shape?.border?.width > 0 ? shape?.border?.width / 2 : 0, rotate: shape?.position?.angle ?? 0, }} stroke={shape?.border?.colour} strokeLinejoin="round" strokeWidth={shape?.border?.width} /> {!shape?.transparency && props?.children && props.children} ); });