Skip to content

Commit

Permalink
chore(page-building): use array options.insertMenu.layout
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhg committed May 24, 2024
1 parent 32f517b commit d51d764
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/page-building-studio/schemaTypes/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {hero} from './hero'
import {logoCarousel} from './logoCarousel'
import {page} from './page'
import {page, pageOneBlockType} from './page'
import {testimonial, testimonials} from './testimonials'

export const schemaTypes = [page, hero, logoCarousel, testimonial, testimonials]
export const schemaTypes = [page, pageOneBlockType, hero, logoCarousel, testimonial, testimonials]
29 changes: 29 additions & 0 deletions dev/page-building-studio/schemaTypes/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ export const page = defineType({
title: 'Blocks',
type: 'array',
of: [{type: 'hero'}, {type: 'logo-carousel'}, {type: 'testimonials'}],
options: {
insertMenu: {
layout: 'full',
},
},
}),
],
})

export const pageOneBlockType = defineType({
type: 'document',
name: 'pageOneBlockType',
title: 'Page (One Block Type)',
fields: [
defineField({
type: 'string',
name: 'title',
title: 'Title',
}),
defineField({
name: 'blocks',
title: 'Blocks',
type: 'array',
of: [{type: 'hero'}],
options: {
insertMenu: {
layout: 'full',
},
},
}),
],
})

0 comments on commit d51d764

Please sign in to comment.