Files
_hublib-web/packages/content-suggestions/src/stories/ContentTitleWithSuggestions.stories.tsx

51 lines
1.2 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 type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import { ContentTitleWithSuggestions } from "../react";
const DEMO_TITLE =
"Заголовок с @[Мария](123e4567-e89b-12d3-a456-426614174001), тегом #release и ссылкой github.com";
const meta: Meta<typeof ContentTitleWithSuggestions> = {
title: "React/ContentTitleWithSuggestions",
component: ContentTitleWithSuggestions,
tags: ["autodocs"],
args: {
text: DEMO_TITLE,
blur: false,
ellipsis: {
rows: 2,
expandable: true,
symbol: "Читать полностью",
},
},
argTypes: {
text: { control: "text" },
blur: { control: "boolean" },
ellipsis: { control: false },
renderMention: { control: false },
renderTag: { control: false },
renderLink: { control: false },
ParagraphComponent: { control: false },
TextComponent: { control: false },
TitleComponent: { control: false },
},
render: args => (
<div style={{ maxWidth: 780, width: "100%" }}>
<ContentTitleWithSuggestions {...args} />
</div>
),
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Playground: Story = {};
export const Blurred: Story = {
args: {
blur: true,
},
};