Ability to pass args to story as an array?
RobertByrnes opened this issue · comments
Robert Byrnes commented
Hi @mrtimbrook is this supported and I am missing something? I have been so far able to pass an array to the story so it registers in the controls addon effectively but only gets passed to the components blade as a bool?
Tim Brook commented
Hi. Yep, arrays are supported. Can you send over an example of one that's causing you an issue?
Does this work for you?
@storybook([
'args' => [
'testArray' => [
'item1', 'item2', 'item3'
]
]
])
@foreach ($testArray as $item)
<p>{{ $item }}</p>
@endforeach
Robert Byrnes commented
Will do...cheers