MCPcopy
hub / github.com/megh-bari/pattern-craft / previewPattern

Function previewPattern

src/components/patterns/pattern-card.tsx:31–36  ·  view source on GitHub ↗
(patternId: string)

Source from the content-addressed store, hash-verified

29 const isPatternDark = theme === "dark";
30
31 const previewPattern = (patternId: string) => {
32 setActivePattern(patternId === activePattern ? null : patternId);
33 setTimeout(() => {
34 window.scrollTo({ top: 0, behavior: "smooth" });
35 }, 200);
36 };
37
38 const handleCardInteraction = (patternId: string) => {
39 setActiveMobileCard(activeMobileCard === patternId ? null : patternId);

Callers 1

PatternCardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected