2023-04-04 03:38:34 +03:00
|
|
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
|
|
import { StoryObj } from '@storybook/vue3';
|
|
|
|
import { userDetailed } from '../../../.storybook/fakes';
|
|
|
|
import MkAcct from './MkAcct.vue';
|
|
|
|
export const Default = {
|
|
|
|
render(args) {
|
|
|
|
return {
|
|
|
|
components: {
|
|
|
|
MkAcct,
|
|
|
|
},
|
|
|
|
setup() {
|
|
|
|
return {
|
|
|
|
args,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
props() {
|
|
|
|
return {
|
|
|
|
...this.args,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
template: '<MkAcct v-bind="props" />',
|
|
|
|
};
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
user: {
|
2023-04-06 02:19:49 +03:00
|
|
|
...userDetailed(),
|
2023-04-04 03:38:34 +03:00
|
|
|
host: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
layout: 'centered',
|
|
|
|
},
|
|
|
|
} satisfies StoryObj<typeof MkAcct>;
|
|
|
|
export const Detail = {
|
|
|
|
...Default,
|
|
|
|
args: {
|
|
|
|
...Default.args,
|
2023-04-06 02:19:49 +03:00
|
|
|
user: userDetailed(),
|
2023-04-04 03:38:34 +03:00
|
|
|
detail: true,
|
|
|
|
},
|
|
|
|
} satisfies StoryObj<typeof MkAcct>;
|
2023-05-05 02:16:55 +03:00
|
|
|
export const Long = {
|
2023-05-07 13:08:43 +03:00
|
|
|
...Default,
|
|
|
|
args: {
|
|
|
|
...Default.args,
|
|
|
|
user: {
|
|
|
|
...userDetailed(),
|
|
|
|
username: 'the_quick_brown_fox_jumped_over_the_lazy_dog',
|
|
|
|
host: 'misskey.example',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
decorators: [
|
|
|
|
() => ({
|
|
|
|
template: '<div style="width: 360px;"><story/></div>',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
} satisfies StoryObj<typeof MkAcct>;
|
|
|
|
export const VeryLong = {
|
2023-05-05 02:16:55 +03:00
|
|
|
...Default,
|
|
|
|
args: {
|
|
|
|
...Default.args,
|
|
|
|
user: {
|
|
|
|
...userDetailed(),
|
|
|
|
username: '2c7cc62a697ea3a7826521f3fd34f0cb273693cbe5e9310f35449f43622a5cdc',
|
2023-05-07 13:08:43 +03:00
|
|
|
host: 'the.quick.brown.fox.jumped.over.the.lazy.dog.very.long.hostname.nostr.example',
|
2023-05-05 02:16:55 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
decorators: [
|
|
|
|
() => ({
|
|
|
|
template: '<div style="width: 360px;"><story/></div>',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
} satisfies StoryObj<typeof MkAcct>;
|