Download next.js/examples/cms-makeswift/lib/makeswift/register-components.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 407 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-makeswift/lib/makeswift/register-components.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-makeswift/lib/makeswift/register-components.tsx
-
curl -L -o register-components.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-makeswift/lib/makeswift/register-components.tsx
407 Bytes
| import { Style } from "@makeswift/runtime/controls"; | |
| import { ReactRuntime } from "@makeswift/runtime/react"; | |
| // Register your components here! | |
| function HelloWorld(props: { className?: string }) { | |
| return <p {...props}>Hello, world!</p>; | |
| } | |
| ReactRuntime.registerComponent(HelloWorld, { | |
| type: "hello-world", | |
| label: "Hello, world!", | |
| props: { | |
| className: Style({ properties: Style.All }), | |
| }, | |
| }); | |