60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from "@storybook/svelte";
|
|
import UpObject from "../components/display/UpObject.svelte";
|
|
import { videoAddress } from "./common";
|
|
import RouterDecorator from "./RouterDecorator.svelte";
|
|
|
|
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,
|
|
},
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
decorators: [() => RouterDecorator as any],
|
|
};
|
|
|
|
export const Banner: Story = {
|
|
args: {
|
|
banner: true,
|
|
},
|
|
};
|
|
|
|
export const BannerWithLabels: Story = {
|
|
args: {
|
|
banner: true,
|
|
labels: ["Label 1", "Label B", "Label III"],
|
|
},
|
|
};
|