diff --git a/docs/api/csf.md b/docs/api/csf.md index af8b1d8041cb..b96c2fd970e3 100644 --- a/docs/api/csf.md +++ b/docs/api/csf.md @@ -109,24 +109,12 @@ Now consider the same example, re-written with args: 'vue/button-story-click-handler-args.2.js.mdx', 'vue/button-story-click-handler-args.3.js.mdx', 'angular/button-story-click-handler-args.ts.mdx', + 'svelte/button-story-click-handler-args.js.mdx', ]} /> -At first blush, this might seem no better than the original example. However, if we add the [Docs addon](https://github.com/storybookjs/storybook/tree/master/addons/docs) and configure the [Actions addon](https://github.com/storybookjs/storybook/tree/master/addons/actions) appropriately, we can write: - - - - - - Or even more simply: @@ -136,6 +124,8 @@ Or even more simply: paths={[ 'react/button-story-click-handler-simplificated.js.mdx', 'angular/button-story-click-handler-simplificated.ts.mdx', + 'vue/button-story-click-handler-simplificated.js.mdx', + 'svelte/button-story-click-handler-simplificated.native-format.mdx', ]} /> diff --git a/docs/snippets/angular/button-story-click-handler-args.ts.mdx b/docs/snippets/angular/button-story-click-handler-args.ts.mdx index 7ed232bab028..024ee79c92a6 100644 --- a/docs/snippets/angular/button-story-click-handler-args.ts.mdx +++ b/docs/snippets/angular/button-story-click-handler-args.ts.mdx @@ -16,9 +16,11 @@ export default { component: Button, } as Meta; -export const Text: Story = (args) => ({ - props: args, - template: ``, +export const Text: Story = ({ label, onClick }) => ({ + props: { + label, + onClick, + }, }); Text.args = { diff --git a/docs/snippets/react/button-story-click-handler-args.js.mdx b/docs/snippets/react/button-story-click-handler-args.js.mdx index bad3e5076f68..0219ef1a3d6e 100644 --- a/docs/snippets/react/button-story-click-handler-args.js.mdx +++ b/docs/snippets/react/button-story-click-handler-args.js.mdx @@ -17,4 +17,9 @@ export default { }; export const Text = ({ label, onClick }) =>