- Issue created by @mstrelan
- Assigned to dan.d
- Status changed to Needs review
about 1 year ago 1:13pm 19 September 2023 - πΊπΈUnited States dan.d
There are two ways to achieve this:
1. If you are trying to create a list of selections to swap out in your story, based on - https://storybook.js.org/docs/react/api/arg-types#mapping, you can use mapping:
title: Your Components/Examples/Component argsTypes: argument_name: name: Give it a Name control: select options: - Option_1 - Option_2 mapping: Option_1: <p>Option one stuff</p> (or whatever you need, e.g. object, array, etc) Option_2: <p>Option two stuff</p> (or whatever you need, e.g. object, array, etc)
... to pass default arguments, use args property:
args:
argument_name: Option_12. You can also provide a single value for the field.
stories: - name: 1. Your Story args: content: | <p>Whatever your heart desires goes here</p>
@e0ipso - I suggest we create an example in this collection to demonstrate the case.