Repeater Items
repeaterItems
should be an array with one configuration object for each repeated block.
The configuration object has the following shape:
Properties​
interface IRepeaterItem {
name: string
itemType: string
itemLabel?: string
min?: number
max?: number
}
Properties definition​
Property | Definition |
---|---|
name | Name of the prop passed to the component with these repeated items |
itemType | It corresponds to the unique name of the repeated Brick type (for example "feature-item") |
itemLabel? | Optional label used for the Add / Remove buttons. If none is provided, the repeated brick's label is used as fallback |
min | Minimum number of repeated items allowed |
max | Maximum number of repeated items allowed |
Usage example​
YourBrick.schema {
...
repeaterItems: [
{
name: 'buttons',
itemType: 'button',
itemLabel: 'Button',
min: 0,
max: 2,
},
],
...
}