Settings Object
The settings
object lets you access a section's properties and setting values.
settings.name
Returns the name of the section.
settings.label
Returns the label of the section.
settings.props
Returns an object of all the props. More about props.
settings.blocks
Returns an array of section blocks. More about Blocks.
settings.preset
Returns an array of section preset. This can be used to set a default value for blocks.
Example
export const settings = {
label: 'Swipe Gallery',
blocks: [
{
label: 'Image card',
type: 'gallery',
props: [
{
id: 'url',
label: 'Banner Image Link',
type: 'text',
default: '',
info: 'Link to the image that should be displayed in banner',
},
{
id: 'alt',
label: 'Alt Text',
type: 'text',
default: 'Image Alt',
info: 'Image Alt',
},
{
id: 'width',
label: 'Image Width',
type: 'text',
default: '100',
info: 'Width of image in %',
},
],
},
],
props: [
{
id: 'title',
label: 'Title',
type: 'text',
default: '',
info: 'Link to the image that should be displayed in banner',
},
],
};