MCPcopy Create free account
hub / github.com/LuisMPS/build-ui / CounterView

Function CounterView

examples/tutorial/src/components/ui/counter/CounterView.js:4–31  ·  view source on GitHub ↗
({
    id,
    ...props
})

Source from the content-addressed store, hash-verified

2import Counter from "./Counter";
3
4const CounterView = ({
5 id,
6 ...props
7}) => {
8 const handleButton = event => {
9 event.stopPropagation();
10 }
11 const editor = useEditor({
12 id: id
13 });
14 const {
15 handlePanel,
16 handleDragStart,
17 handleDragEnd,
18 } = editor;
19 return <DnDBuilder
20 onClick = {handlePanel}
21 onDragStart = {handleDragStart}
22 onDragEnd = {handleDragEnd}
23 draggable = {true}
24 >
25 <Counter
26 {...props}
27 onAdd = {handleButton}
28 onSubstract = {handleButton}
29 />
30 </DnDBuilder>
31}
32
33export default CounterView;

Callers

nothing calls this directly

Calls 1

useEditorFunction · 0.90

Tested by

no test coverage detected