MCPcopy
hub / github.com/udecode/plate / ToggleAboveNodes

Function ToggleAboveNodes

packages/toggle/src/react/renderToggleAboveNodes.tsx:12–18  ·  view source on GitHub ↗
({ children, element })

Source from the content-addressed store, hash-verified

10export const renderToggleAboveNodes: RenderNodeWrapper = () => ToggleAboveNodes;
11
12const ToggleAboveNodes: RenderNodeWrapperFunction = ({ children, element }) => {
13 const isVisible = useIsVisible(element.id as string);
14
15 if (isVisible) return children;
16
17 return <div style={hiddenStyle}>{children}</div>;
18};
19
20const hiddenStyle: React.CSSProperties = {
21 height: 0,

Callers

nothing calls this directly

Calls 1

useIsVisibleFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…