```js // YourComponent.stories.js import YourComponent from './YourComponent.vue'; export default { title: 'A complex case with a function', component: YourComponent, //👇 Creates specific argTypes with options argTypes: { propertyA: { options: ['Item One', 'Item Two', 'Item Three'], control: { type: 'select' } // automatically inferred when 'options' is defined }, propertyB: { options: ['Another Item One', 'Another Item Two', 'Another Item Three'], }, }, }; //👇 Some function to demonstrate the behavior const someFunction = (valuePropertyA, valuePropertyB) => { // Makes some computations and returns something }; const Template = (args, { argTypes }) => { //👇 Destructures args values const { propertyA, propertyB } = args; //👇 Assigns the function result to a variable and pass it as a prop into the component const someFunctionResult = someFunction(propertyA, propertyB); //👇 Updates the args value based on the function result args.someProperty = someFunctionResult; return { components: { YourComponent }, props: Object.keys(argTypes), template: ``, }; }; ```