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.

1.0 KB
Raw Blame
import type { Meta, StoryObj } from '@storybook/react'

import { LemonButton } from '../LemonButton'
import { LemonWidget, LemonWidgetProps } from './LemonWidget'

type Story = StoryObj<LemonWidgetProps>
const meta: Meta<LemonWidgetProps> = {
    title: 'Lemon UI/Lemon Widget',
    component: LemonWidget,
    tags: ['autodocs'],
    render: (props) => {
        return (
            <div>
                <LemonWidget {...props}>
                    <div className="p-2">
                        <p>Some serious content here</p>
                        <p className="mb-0">and here</p>
                    </div>
                </LemonWidget>
            </div>
        )
    },
}
export default meta

export const Default: Story = {
    args: {},
}

export const Title: Story = {
    args: { title: 'A title' },
}

export const Closable: Story = {
    args: { title: 'A closable widget', onClose: () => {} },
}

export const Actions: Story = {
    args: { title: 'A title', actions: <LemonButton size="small">Do this over here</LemonButton> },
}