import { Puck } from "@measured/puck";
import "@measured/puck/puck.css";
const config = {
components: {
HeadingBlock: {
fields: {
children: {
type: "text",
},
},
render: ({ children }) => {
return <h1>{children}</h1>;
},
},
},
};
const initialData = {
content: [],
root: {},
};
const save = (data) => {};
export function Editor() {
return <Puck config={config} data={initialData} onPublish={save} />;
}
import { Render } from "@measured/puck";
export function Page() {
return <Render config={config} data={data} />;
}