MCPcopy Create free account
hub / github.com/pollinations/pollinations / generateClipPath

Function generateClipPath

apps/chat/src/components/TutorialModal.jsx:13–32  ·  view source on GitHub ↗
(rect)

Source from the content-addressed store, hash-verified

11
12const TutorialOverlay = memo(({ highlightRect, isTransitioning }) => {
13 const generateClipPath = (rect) => {
14 if (!rect) return "none";
15
16 const { top, left, width, height } = rect;
17 const right = left + width;
18 const bottom = top + height;
19
20 return `polygon(
21 0% 0%,
22 0% 100%,
23 ${left}px 100%,
24 ${left}px ${top}px,
25 ${right}px ${top}px,
26 ${right}px ${bottom}px,
27 ${left}px ${bottom}px,
28 ${left}px 100%,
29 100% 100%,
30 100% 0%
31 )`;
32 };
33
34 return (
35 <>

Callers 1

TutorialModal.jsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected