Skip to content

Commit

Permalink
Vue: pass argTypes instead of args in default render fn
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 16, 2022
1 parent 9968f9e commit 8e0175e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/vue/src/client/preview/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const root = new Vue({
});

export const render: ArgsStoryFn<VueFramework> = (props, context) => {
const { id, component: Component } = context;
const { id, component: Component, argTypes } = context;
const component = Component as VueFramework['component'] & {
__docgenInfo?: { displayName: string };
props: Record<string, any>;
Expand All @@ -49,7 +49,7 @@ export const render: ArgsStoryFn<VueFramework> = (props, context) => {
}

return {
props,
props: Object.keys(context.argTypes),
components: { [componentName]: component },
template: `<${componentName} v-bind="$props" />`,
};
Expand Down

0 comments on commit 8e0175e

Please sign in to comment.