MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / ExamplePlugin

Function ExamplePlugin

app/src/components/examplePlugin.tsx:8–32  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

6 setCount: Setter<number>
7 child: VoidComponent<{ count: number; setCount: Setter<number> }>
8}> = (props) => {
9 return (
10 <div class='border-gray-900 m-1 rounded-lg border p-1'>
11 <h1>Default Plugin Placeholder</h1>
12 <button
13 class='border-gray-900 mx-2 rounded-lg border px-2'
14 onClick={() => props.setCount(props.count - 2)}
15 >
16 -2
17 </button>
18 <output>Count: {props.count}</output>
19 <button
20 class='border-gray-900 mx-2 rounded-lg border px-2'
21 onClick={() => props.setCount(props.count + 2)}
22 >
23 +2
24 </button>
25 <Dynamic
26 component={props.child}
27 count={props.count}
28 setCount={props.setCount}
29 />
30 </div>
31 )
32}
33
34export default ExamplePlugin

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected