From 3d80a4d0ba4cba3c699258d486f86a1482d7520b Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni Date: Tue, 20 Jul 2021 16:10:04 +0530 Subject: [PATCH] fix: update stories --- stories/Tweakpane.stories.ts | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/stories/Tweakpane.stories.ts b/stories/Tweakpane.stories.ts index 6816e214..974e6c0d 100644 --- a/stories/Tweakpane.stories.ts +++ b/stories/Tweakpane.stories.ts @@ -5,23 +5,13 @@ export default { title: 'Tweakpane/Examples', }; -//๐Ÿ‘‡ We create a โ€œtemplateโ€ of how args map to rendering -const Template = (args) => ({ +export const SinglePane = (args) => ({ components: { VTweakpane }, setup() { - //๐Ÿ‘‡ The args will now be passed down to the template return { args }; }, - template: `
- -
-
- -
`, + template: ``, }); - -//๐Ÿ‘‡ Each story then reuses that template -export const SinglePane = Template.bind({}); SinglePane.args = { pane: { title: 'My Awesome Pane', @@ -52,11 +42,23 @@ SinglePane.args = { }, }; -export const MultiplePanes = Template.bind({}); +export const MultiplePanes = (args) => ({ + components: { VTweakpane }, + setup() { + return { args }; + }, + template: ` +
+
+ +
+
+ `, +}); MultiplePanes.args = { panes: [ { - title: 'My Awesome Pane', + title: 'My 1st Awesome Pane', inputs: [ { factor: 123, @@ -83,11 +85,9 @@ MultiplePanes.args = { ], }, { - title: 'My Awesome Pane', + title: 'My 2nd Awesome Pane', inputs: [ { - factor: 123, - title: 'hello', color: '#0f0', }, ],