summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts
diff options
context:
space:
mode:
authortaichan <40626578+tai-cha@users.noreply.github.com>2025-02-08 17:33:09 +0900
committerGitHub <noreply@github.com>2025-02-08 08:33:09 +0000
commit2f8d02024a389181794ee9e8f2b70ffbd057cf6f (patch)
tree6b8c3b4cfb9a161b03ad2b33b29074ee33ac37fc /packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts
parentenhance(frontend): クライアントエラー画面の多言語対応 (#15411) (diff)
downloadsharkey-2f8d02024a389181794ee9e8f2b70ffbd057cf6f.tar.gz
sharkey-2f8d02024a389181794ee9e8f2b70ffbd057cf6f.tar.bz2
sharkey-2f8d02024a389181794ee9e8f2b70ffbd057cf6f.zip
feat(frontend): 画像を投稿前にプレビュー可能に (#15341)
* feat(client): 画像をプレビュー可能に * Update Changelog * SPDX * 消えてたのFix * Add storybook for MkImgPreviewDialog * backgroundのスタイル変更 Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> * Add MkImgPreviewDialog to storybook generator * Update packages/frontend/.storybook/generate.tsx --------- Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts')
-rw-r--r--packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts b/packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts
new file mode 100644
index 0000000000..339e6d10f3
--- /dev/null
+++ b/packages/frontend/src/components/MkImgPreviewDialog.stories.impl.ts
@@ -0,0 +1,40 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { StoryObj } from '@storybook/vue3';
+import { file } from '../../.storybook/fakes.js';
+import MkImgPreviewDialog from './MkImgPreviewDialog.vue';
+export const Default = {
+ render(args) {
+ return {
+ components: {
+ MkImgPreviewDialog,
+ },
+ setup() {
+ return {
+ args,
+ };
+ },
+ computed: {
+ props() {
+ return {
+ ...this.args,
+ };
+ },
+ },
+ template: '<MkImgPreviewDialog v-bind="props" />',
+ };
+ },
+ args: {
+ file: file(),
+ },
+ parameters: {
+ chromatic: {
+ // NOTE: ロードが終わるまで待つ
+ delay: 3000,
+ },
+ layout: 'centered',
+ },
+} satisfies StoryObj<typeof MkImgPreviewDialog>;