Array
export function MyComponent(props) {
const frames = props.images.map(image => <Frame image={image} width={"1fr"} height={"1fr"} />)
return <Stack size={"100%"}>{frames}</Stack>
}
addPropertyControls(MyComponent, {
images: {
type: ControlType.Array,
propertyControl: {
type: ControlType.Image
}
// Allow up to five items
maxCount: 5,
},
})
addPropertyControls(MyComponent, {
children: {
type: ControlType.Array,
propertyControl: {
type: ControlType.ComponentInstance
},
maxCount: 5,
},
})Last updated