A list field contains blocks of fields. Every block is configured using a specific type. These can be created using the schema and type functions as seen before.
import {Config, Field} from 'alinea'
Field.list('My list field', {
schema: {
Text: Config.type('Text', {
fields: {
title: Field.text('Item title'),
text: Field.richText('Item body text')
}
}),
Image: Config.type('Image', {
fields: {image: Field.image('Image')}
})
}
})