import { SeeMore } from "./index"; import { DocsPage } from "@shared/stories/DocsTemplate"; import type { Meta, StoryObj } from "@storybook/react"; const meta: Meta = { title: "Components/SeeMore", component: SeeMore, tags: ["autodocs"], parameters: { layout: "centered", docs: { page: DocsPage, description: { component: "An expandable component that shows/hides a checklist of items with a toggle button.", }, }, }, argTypes: { list: { control: { type: "object" }, description: "Array of strings to display in the checklist", }, text: { control: { type: "text" }, description: "Text for the toggle button", }, }, args: { list: ["Feature 1", "Feature 2", "Feature 3"], text: "See details", }, }; export default meta; type Story = StoryObj; // Default see more export const Default: Story = { args: {}, }; // Expanded by default export const Expanded: Story = { args: { list: [ "High-speed internet connection", "24/7 customer support", "No data caps", "Free installation", ], text: "See details", }, render: args => (
), }; // Collapsed by default export const Collapsed: Story = { args: { list: ["Item 1", "Item 2", "Item 3"], text: "Show more", }, render: args => (
), }; // With checklist items export const WithChecklistItems: Story = { args: { list: [ "Unlimited data usage", "Free router included", "24/7 technical support", "No long-term contract", "30-day money-back guarantee", ], text: "View all features", }, render: args => (
), }; // Custom button text export const CustomButtonText: Story = { args: { list: ["Detail 1", "Detail 2", "Detail 3"], text: "Learn more", }, render: args => (
), }; // Long list export const LongList: Story = { args: { list: [ "Feature one with detailed description", "Feature two", "Feature three", "Feature four", "Feature five", "Feature six", "Feature seven", "Feature eight", "Feature nine", "Feature ten", ], text: "See all features", }, render: args => (
), }; // Single item export const SingleItem: Story = { args: { list: ["Single checklist item"], text: "See details", }, render: args => (
), }; // All variants showcase export const AllVariants: Story = { render: () => (

Default

Custom Button Text

Long List

), parameters: { docs: { description: { story: "Showcase of all SeeMore variants and configurations.", }, }, }, };