import React, { useMemo } from "react";
import styled from "styled-components";
import { usePlotContext } from "./plot-utils";
export const ClipPath = ({ id, margin }) => {
const { left, top, innerWidth, innerHeight } = usePlotContext();
return (
);
};
ClipPath.defaultProps = {
id: "content-area",
margin: 0,
};
const ClipG = styled.g.attrs((p) => ({
style: { clipPath: `url(#${p.regionID})` },
}))``;
export const ClipPlotRegion = ({ id, margin, children }) => {
const idMemo = useMemo(() => (id ? id : `clip-path-${Math.random()}`), [id]);
return (
<>
{children}
>
);
};
ClipPlotRegion.defaultProps = {
id: "",
margin: 0,
};