: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { LemonButton, LemonModal } from '@posthog/lemon-ui'
import { ResultDetails } from 'scenes/experiments/MetricsView/new/ResultDetails'
import { ExperimentMetric } from '~/queries/schema/schema-general'
import type { Experiment } from '~/types'
interface DetailsModalProps {
isOpen: boolean
onClose: () => void
metric: ExperimentMetric
result: any
experiment: Experiment
}
export function DetailsModal({ isOpen, onClose, metric, result, experiment }: DetailsModalProps): JSX.Element {
return (
<LemonModal
isOpen={isOpen}
onClose={onClose}
width={1200}
title={`Metric results: ${metric.name || 'Untitled metric'}`}
footer={
<LemonButton type="secondary" onClick={onClose}>
Close
</LemonButton>
}
>
<ResultDetails result={result} experiment={experiment} metric={metric} surface="details_modal" />
</LemonModal>
)
}