This commit is contained in:
Mackie 2026-06-07 21:40:08 +08:00
parent 05fc57928b
commit a1fb68764a
2 changed files with 20 additions and 34 deletions

View file

@ -54,7 +54,7 @@ export const RenderBlocks: React.FC<{
if (Block) {
return (
<div key={index}>
<div key={index} id={blockType}>
<Block {...block} disableInnerContainer />
</div>
)

View file

@ -4,43 +4,34 @@ export const ShowcaseBlock: Block = {
slug: 'showcase',
labels: { singular: 'Showcase', plural: 'Showcases' },
fields: [
{
name: 'heading',
type: 'text',
label: 'Heading',
},
{
name: 'subheading',
type: 'text',
label: 'Subheading',
},
{ name: 'heading', type: 'text', label: 'Heading' },
{ name: 'subheading', type: 'text', label: 'Subheading' },
{
name: 'items',
type: 'array',
label: 'Items',
minRows: 1,
fields: [
{ name: 'image', type: 'upload', relationTo: 'media', label: 'Image (optional)' },
{ name: 'imageUrl', type: 'text', label: 'Image click URL (optional)' },
{ name: 'title', type: 'text', label: 'Title', required: true },
{ name: 'description', type: 'textarea', label: 'Description' },
{
name: 'image',
type: 'upload',
relationTo: 'media',
label: 'Image (optional)',
},
{
name: 'imageUrl',
type: 'text',
label: 'Image click URL (optional)',
},
{
name: 'title',
type: 'text',
label: 'Title',
name: 'category',
type: 'select',
label: 'Category',
required: true,
defaultValue: 'engineering',
options: [
{ label: 'Engineering', value: 'engineering' },
{ label: 'Design', value: 'design' },
],
},
{
name: 'description',
type: 'textarea',
label: 'Description',
name: 'featured',
type: 'checkbox',
label: 'Featured',
defaultValue: false,
},
{
name: 'tags',
@ -55,12 +46,7 @@ export const ShowcaseBlock: Block = {
fields: [
{ name: 'label', type: 'text', label: 'Label', required: true },
{ name: 'url', type: 'text', label: 'URL', required: true },
{
name: 'newTab',
type: 'checkbox',
label: 'Open in new tab',
defaultValue: true,
},
{ name: 'newTab', type: 'checkbox', label: 'Open in new tab', defaultValue: true },
],
},
],