import { withBluefish, withBluefishFn, BBox } from '../bluefish'; import { NewBBox } from '../NewBBox'; export type CircleProps = React.SVGProps; export const Circle = withBluefishFn( ({ cx, cy, r }: CircleProps) => { return () => { console.log('placeable circle', cx, cy, r); return { left: cx !== undefined ? +cx - +(r ?? 0) : undefined, top: cy !== undefined ? +cy - +(r ?? 0) : undefined, width: r !== undefined ? +r * 2 : undefined, height: r !== undefined ? +r * 2 : undefined, }; }; }, (props: CircleProps & { $bbox?: Partial }) => { const { $bbox, ...rest } = props; return ( ); }, );