MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / Page

Function Page

lowcode-editor/src/editor/materials/Page/dev.tsx:4–18  ·  view source on GitHub ↗
({ id, name, children, styles }: CommonComponentProps)

Source from the content-addressed store, hash-verified

2import { useMaterailDrop } from "../../hooks/useMaterailDrop";
3
4function Page({ id, name, children, styles }: CommonComponentProps) {
5
6 const {canDrop, drop } = useMaterailDrop(['Button', 'Container', 'Modal', 'Table', 'Form'], id);
7
8 return (
9 <div
10 data-component-id={id}
11 ref={drop}
12 className='p-[20px] h-[100%] box-border'
13 style={{ ...styles, border: canDrop ? '2px solid blue' : 'none' }}
14 >
15 {children}
16 </div>
17 )
18}
19
20export default Page;

Callers

nothing calls this directly

Calls 1

useMaterailDropFunction · 0.90

Tested by

no test coverage detected