Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

779 B
Raw Blame
import { StoryObj } from '@storybook/react'
import { Meta } from '@storybook/react'

import MonacoDiffEditor, { MonacoDiffEditorProps } from './MonacoDiffEditor'

type Story = StoryObj<MonacoDiffEditorProps>
const meta: Meta<MonacoDiffEditorProps> = {
    title: 'Components/Monaco Diff Editor',
    component: MonacoDiffEditor as any,
    tags: ['autodocs', 'test-skip'], // There are too many icons, the snapshots are huge in table form
}
export default meta

export const Default: Story = {
    args: {
        original: 'console.log("Hello, world!");',
        modified: 'console.log("Hello, world!", "foo");',
    },
}

export const JSONDiff: Story = {
    args: {
        original: JSON.stringify({ a: 1, b: 2 }),
        modified: JSON.stringify({ a: 1, b: 3 }),
    },
}