#Empty block as place holder for UI
8 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
This is my logic for handling this:
export const PlaceHolderForUi = (label: string) => ({
slug: label.toLocaleLowerCase().replaceAll(' ', '_'),
labels: {
singular: label,
plural: label,
},
fields:[
{
name: "title",
label: `This block will added ${label} component in UI`,
type: "group",
fields:[],
}
]
})
Let me if there is better way to do it.
iirc blocks are not required to have fields, you can pass an empty array
But I don't see anything wrong with your approach
i mean empty block doesn't have anything and looks ugly. with this approach. it has some text and not empty. I'm wondering if there is a better way.