import React from 'react'; import { Markdown } from './Markdown'; import type { Meta, StoryObj } from '@storybook/react'; const meta: Meta = { title: 'Components/Markdown', component: Markdown, parameters: { layout: 'padded', }, }; export default meta; type Story = StoryObj; /** * A "Kitchen Sink" demonstration of all Markdown components working together * as they would in a real article. */ export const KitchenSink: Story = { render: () => (
The Art of Markdown Integration This article demonstrates how our design system translates standard Markdown tags into beautiful, accessible UI primitives. From typography to complex data tables. Typography & Vertical Rhythm Our typography system is built on a strict vertical rhythm. Headers use the{' '} Header component, while paragraphs leverage the{' '} Paragraph component with pre-configured gutters. "Design is not just what it looks like and feels like. Design is how it works."
— Steve Jobs
Nesting and Lists Lists are handled by our List system, supporting both ordered and unordered variants: Standardization across all articles Support for nested structures: Nested unordered item Another nested item Consistent spacing and markers Code & Technical Content Technical articles often require code blocks. We use{' '} CodeBlock for multi-line snippets: {`export const MarkdownP = memo(function MarkdownP(props: ParagraphProps) { return ; });`} Data Representation Tables are notoriously difficult to style in Markdown. Our components ensure they stay within the container and maintain readable density. Component Tag Status MarkdownP p Verified MarkdownTable table Verified Visual Assets
), }; /** * Specifically showcases the header hierarchy from H1 to H6. */ export const HeaderHierarchy: Story = { render: () => (
Header Level 1 Header Level 2 Header Level 3 Header Level 4 Header Level 5 Header Level 6
), }; /** * Demonstrates various list types and their spacing. */ export const ListStyles: Story = { render: () => (
Unordered List First item Second item Third item
Ordered List Step one: Preparation Step two: Implementation Step three: Verification
), }; /** * Showcases code blocks with language-specific syntax highlighting. */ export const CodeLanguages: Story = { render: () => (
TypeScript {`interface User { id: number; name: string; } const greet = (user: User) => { console.log(\`Hello, \${user.name}!\`); };`}
Rust {`fn main() { let name = "World"; println!("Hello, {}!", name); }`}
Python {`def greet(name: str): print(f"Hello, {name}!") if __name__ == "__main__": greet("World")`}
JSON {`{ "project": "ermnvldmr.com", "version": "1.0.0", "private": true }`}
), };