docs: note about Storybook
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { resolve } from 'node:path';
|
||||
import type { StorybookConfig } from '@storybook/vue3-vite';
|
||||
import { mergeConfig } from 'vite';
|
||||
import { getConfig } from '../vite.config';
|
||||
const config = {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
addons: [
|
||||
@@ -22,18 +21,9 @@ const config = {
|
||||
disableTelemetry: true,
|
||||
},
|
||||
async viteFinal(config, options) {
|
||||
const { plugins, build: { rollupOptions, ...build }, ...original } = getConfig();
|
||||
console.dir(config, {depth:Infinity});
|
||||
console.dir(original, {depth:Infinity});
|
||||
const x = mergeConfig(config, {
|
||||
...original,
|
||||
build,
|
||||
return mergeConfig(config, {
|
||||
assetsInclude: [resolve(__dirname, '../node_modules/@tabler/icons-webfont/**/*.{css,eot,ttf,woff,woff2}')],
|
||||
server: {
|
||||
hmr: false,
|
||||
},
|
||||
});
|
||||
return x;
|
||||
},
|
||||
} satisfies StorybookConfig;
|
||||
export default config;
|
||||
|
@@ -0,0 +1,2 @@
|
||||
import MkCaptcha from './MkCaptcha.vue';
|
||||
void MkCaptcha;
|
@@ -1,34 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
/* eslint-disable import/no-default-export */
|
||||
import { Meta, StoryObj } from '@storybook/vue3';
|
||||
import MkCaptcha from './MkCaptcha.vue';
|
||||
import { Meta } from '@storybook/vue3';
|
||||
const meta = {
|
||||
title: 'components/MkCaptcha',
|
||||
component: MkCaptcha,
|
||||
} satisfies Meta<typeof MkCaptcha>;
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkCaptcha,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkCaptcha v-bind="props" />',
|
||||
};
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkCaptcha>;
|
||||
export default meta;
|
||||
import MkCaptcha from './MkCaptcha.vue';
|
||||
void MkCaptcha;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
/* eslint-disable import/no-default-export */
|
||||
/* eslint-disable import/no-duplicates */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkAvatar from './MkAvatar.vue';
|
||||
|
@@ -7,7 +7,6 @@ const meta = {
|
||||
} satisfies Meta<typeof MkAvatar>;
|
||||
export default meta;
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
/* eslint-disable import/no-default-export */
|
||||
/* eslint-disable import/no-duplicates */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkAvatar from './MkAvatar.vue';
|
||||
@@ -68,13 +67,6 @@ export const ProfilePageCat = {
|
||||
user: {
|
||||
...ProfilePage.args.user,
|
||||
isCat: true,
|
||||
// avatarUrl: 'https://millionlive-theaterdays.idolmaster-official.jp/assets/data/webp/common/footer/icon_app.png.webp',
|
||||
// avatarUrl: 'https://cdn.imastodon.net/accounts/avatars/000/144/021/original/8137afa4114ab85f.png',
|
||||
// avatarUrl: 'https://avatars.githubusercontent.com/u/4439005?v=4',
|
||||
// avatarUrl: 'https://avatars.githubusercontent.com/u/7973572?v=4',
|
||||
// avatarUrl: 'https://avatars.githubusercontent.com/u/6533808?v=4',
|
||||
// avatarUrl: 'https://avatars.githubusercontent.com/u/7106976?v=4',
|
||||
avatarUrl: 'https://avatars.githubusercontent.com/u/3396686?v=4',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user