w-funnel/src/components/widgets/TextList/TextList.stories.tsx
gofnnp 55b81890a3 trial-payment
new pages
2025-10-01 17:33:49 +04:00

79 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Meta, StoryObj } from "@storybook/nextjs-vite";
import TextList from "./TextList";
import { TypographyProps } from "@/components/ui/Typography/Typography";
const meta: Meta<typeof TextList> = {
title: "Widgets/TextList",
component: TextList,
parameters: {
layout: "centered",
},
tags: ["autodocs"],
argTypes: {
items: {
control: { type: "object" },
description: "Массив элементов списка с пропсами Typography",
},
listStyleType: {
control: { type: "select" },
options: ["decimal", "disc", "none"],
description: "Тип маркера списка",
},
markerImage: {
control: { type: "text" },
description: "URL изображения для маркера списка",
},
},
};
export default meta;
type Story = StoryObj<typeof meta>;
const defaultItems: TypographyProps<"li">[] = [
{
children: "Первый элемент списка",
},
{
children: "Второй элемент списка",
},
{
children: "Третий элемент списка",
},
];
export const Default: Story = {
args: {
items: defaultItems,
listStyleType: "disc",
},
};
export const Decimal: Story = {
args: {
items: defaultItems,
listStyleType: "decimal",
},
};
export const Disc: Story = {
args: {
items: defaultItems,
listStyleType: "disc",
},
};
export const None: Story = {
args: {
items: defaultItems,
listStyleType: "none",
},
};
export const WithImage: Story = {
args: {
items: defaultItems,
listStyleType: "image",
markerImage: "/check-mark.svg",
},
};