57 lines
1.0 KiB
TypeScript
57 lines
1.0 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
import UpObject from '../lib/components/display/UpObject.svelte';
|
|
import { videoAddress } from './common';
|
|
|
|
const address = videoAddress;
|
|
|
|
const meta: Meta<UpObject> = {
|
|
title: 'Display/UpObject',
|
|
component: UpObject,
|
|
tags: ['autodocs'],
|
|
args: {
|
|
address
|
|
},
|
|
argTypes: {
|
|
address: {
|
|
defaultValue: address,
|
|
name: 'Address',
|
|
type: 'string'
|
|
},
|
|
onResolved: {
|
|
action: 'resolved'
|
|
}
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
} as any
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<UpObject>;
|
|
|
|
// More on writing stories with args: https://storybook.js.org/docs/7.0/svelte/writing-stories/args
|
|
export const Default: Story = {};
|
|
|
|
export const WithLabels: Story = {
|
|
args: {
|
|
labels: ['Label 1', 'Label B', 'Label III']
|
|
}
|
|
};
|
|
|
|
export const Link: Story = {
|
|
args: {
|
|
link: true
|
|
}
|
|
};
|
|
|
|
export const Banner: Story = {
|
|
args: {
|
|
banner: true
|
|
}
|
|
};
|
|
|
|
export const BannerWithLabels: Story = {
|
|
args: {
|
|
banner: true,
|
|
labels: ['Label 1', 'Label B', 'Label III']
|
|
}
|
|
};
|