import { Meta, StoryObj } from '@storybook/react-webpack5';

import Markdown from './Markdown';
import { createSandboxStory, globalScope } from '../../.storybook/components/sandbox/SandboxEditor';

export default {
  component: Markdown,
  title: 'Typography/Markdown',
} satisfies Meta<typeof Markdown>;

type Story = StoryObj<typeof Markdown>;

export const Sandbox = createSandboxStory({
  code: `<Markdown>{\`# Heading

Some **bold** and *italic* text.

1. First item
2. Second item
   - Nested item
\`}</Markdown>`,
  scope: globalScope,
});

export const Basic: Story = {
  args: {
    children: `# Heading
  1. item one
  2. item two
     - sublist
     - sublist`,
  },
};
