import type { Meta, StoryObj } from '@storybook/react-vite' import { IconExternalLink } from '@tabler/icons-react' import { Button } from './Button' import { Card } from './Card' import { ShowMore } from './ShowMore' const LONG = Array.from( { length: 6 }, (_, i) => `Paragraph ${i + 1}. A long description written out in full, the way a real brief is, so that it runs past the height the box allows and needs cutting.`, ).join(' ') /** Long content cut behind a fade, with "Show more" under it. Short content is drawn whole. */ const meta = { title: 'Layout/ShowMore', component: ShowMore, decorators: [(Story) =>
], args: { children:

{LONG}

}, argTypes: { children: { control: false } }, } satisfies Meta export default meta type Story = StoryObj /** Taller than 96px: cut, faded into the surface, "Show more" under it. */ export const Long: Story = {} /** No taller than the limit: drawn whole, no fade, no button. */ export const Short: Story = { args: { children:

One line of description.

}, } /** Inside an inset card: `surface="inset"`, so the fade ends in the card's fill. */ export const InACard: Story = { args: { surface: 'inset' }, render: (args) => (

Title

), } /** `action`: one more small button, level with Show more at the right of its row. */ export const WithAnAction: Story = { args: { surface: 'inset', action: }, render: InACard.render, } /** Short content with an action: no toggle, and the action keeps its place at the right. */ export const ShortWithAnAction: Story = { args: { ...WithAnAction.args, children:

One line of description.

}, render: InACard.render, }