From f39b5be0646c33b09ba7bf12badb8b3fd3de77dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Sat, 1 Apr 2023 16:35:05 +0900 Subject: [PATCH] refactor(#10336): bind to local args --- packages/frontend/.storybook/generate.tsx | 15 +++++++++++++-- .../src/components/MkButton.stories.impl.ts | 2 +- .../src/components/global/MkA.stories.impl.ts | 2 +- .../src/components/global/MkAcct.stories.impl.ts | 2 +- .../src/components/global/MkAd.stories.impl.ts | 2 +- .../components/global/MkAvatar.stories.impl.ts | 2 +- .../global/MkCustomEmoji.stories.impl.ts | 2 +- .../src/components/global/MkEmoji.stories.impl.ts | 2 +- .../components/global/MkLoading.stories.impl.ts | 2 +- .../MkMisskeyFlavoredMarkdown.stories.impl.ts | 2 +- .../global/MkPageHeader.stories.impl.ts | 2 +- .../src/components/global/MkTime.stories.impl.ts | 2 +- .../src/components/global/MkUrl.stories.impl.ts | 2 +- .../components/global/MkUserName.stories.impl.ts | 2 +- 14 files changed, 26 insertions(+), 15 deletions(-) diff --git a/packages/frontend/.storybook/generate.tsx b/packages/frontend/.storybook/generate.tsx index 62e84d149..f501b02ab 100644 --- a/packages/frontend/.storybook/generate.tsx +++ b/packages/frontend/.storybook/generate.tsx @@ -481,8 +481,19 @@ function toStories(component: string): string { - ) as estree.Identifier + + ) as estree.ThisExpression + } + property={ + ( + + ) as estree.Identifier + } + /> + ) as estree.MemberExpression } /> ) as estree.SpreadElement, diff --git a/packages/frontend/src/components/MkButton.stories.impl.ts b/packages/frontend/src/components/MkButton.stories.impl.ts index 228af8f91..e1c1c54d1 100644 --- a/packages/frontend/src/components/MkButton.stories.impl.ts +++ b/packages/frontend/src/components/MkButton.stories.impl.ts @@ -17,7 +17,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkA.stories.impl.ts b/packages/frontend/src/components/global/MkA.stories.impl.ts index 3afec7f81..e17691ac6 100644 --- a/packages/frontend/src/components/global/MkA.stories.impl.ts +++ b/packages/frontend/src/components/global/MkA.stories.impl.ts @@ -18,7 +18,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkAcct.stories.impl.ts b/packages/frontend/src/components/global/MkAcct.stories.impl.ts index 61bf06f8a..79d993dec 100644 --- a/packages/frontend/src/components/global/MkAcct.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAcct.stories.impl.ts @@ -16,7 +16,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkAd.stories.impl.ts b/packages/frontend/src/components/global/MkAd.stories.impl.ts index 68f299564..7d8a42a03 100644 --- a/packages/frontend/src/components/global/MkAd.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAd.stories.impl.ts @@ -18,7 +18,7 @@ const common = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkAvatar.stories.impl.ts b/packages/frontend/src/components/global/MkAvatar.stories.impl.ts index d83164ac5..68fadfc1b 100644 --- a/packages/frontend/src/components/global/MkAvatar.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAvatar.stories.impl.ts @@ -16,7 +16,7 @@ const common = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts index e91fc4e2e..36ab85b57 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts +++ b/packages/frontend/src/components/global/MkCustomEmoji.stories.impl.ts @@ -15,7 +15,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkEmoji.stories.impl.ts b/packages/frontend/src/components/global/MkEmoji.stories.impl.ts index 5baa5c2c8..f9900375f 100644 --- a/packages/frontend/src/components/global/MkEmoji.stories.impl.ts +++ b/packages/frontend/src/components/global/MkEmoji.stories.impl.ts @@ -15,7 +15,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkLoading.stories.impl.ts b/packages/frontend/src/components/global/MkLoading.stories.impl.ts index d240e6566..ca2e14494 100644 --- a/packages/frontend/src/components/global/MkLoading.stories.impl.ts +++ b/packages/frontend/src/components/global/MkLoading.stories.impl.ts @@ -15,7 +15,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.stories.impl.ts b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.stories.impl.ts index 246406169..f6811b674 100644 --- a/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.stories.impl.ts +++ b/packages/frontend/src/components/global/MkMisskeyFlavoredMarkdown.stories.impl.ts @@ -17,7 +17,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts b/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts index 2a37ef1a8..b23a1e3a0 100644 --- a/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts +++ b/packages/frontend/src/components/global/MkPageHeader.stories.impl.ts @@ -15,7 +15,7 @@ export const Empty = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkTime.stories.impl.ts b/packages/frontend/src/components/global/MkTime.stories.impl.ts index fd8e874dc..b72601b1f 100644 --- a/packages/frontend/src/components/global/MkTime.stories.impl.ts +++ b/packages/frontend/src/components/global/MkTime.stories.impl.ts @@ -25,7 +25,7 @@ export const Empty = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkUrl.stories.impl.ts b/packages/frontend/src/components/global/MkUrl.stories.impl.ts index 06de1d3e9..2344c4851 100644 --- a/packages/frontend/src/components/global/MkUrl.stories.impl.ts +++ b/packages/frontend/src/components/global/MkUrl.stories.impl.ts @@ -19,7 +19,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, }, diff --git a/packages/frontend/src/components/global/MkUserName.stories.impl.ts b/packages/frontend/src/components/global/MkUserName.stories.impl.ts index 37d895d04..41b1567a6 100644 --- a/packages/frontend/src/components/global/MkUserName.stories.impl.ts +++ b/packages/frontend/src/components/global/MkUserName.stories.impl.ts @@ -18,7 +18,7 @@ export const Default = { computed: { props() { return { - ...args, + ...this.args, }; }, },