'use client'; /** * Shared primitive UI components used by the playground panels * (Request, Response) in both the slide-in and mobile-sheet surfaces. * Keep this file free of any business logic or context reads. */ import { ChevronRight } from 'lucide-react'; import React from 'react'; import { cn } from '@djangocfg/ui-core/lib'; // ─── Style helpers ──────────────────────────────────────────────────────────── // Method/status → semantic status-token mappings live in ./http-colors and are // re-exported here so existing imports of `./ui` keep working. export { getMethodStyle, getStatusStyle } from './http-colors'; import { getMethodStyle, getStatusStyle } from './http-colors'; // ``relativePath`` lives in utils/url.ts now — re-exported here so every // component that used to import it from ``./ui`` keeps working. export { relativePath } from '../../utils/url'; // ─── Atoms ──────────────────────────────────────────────────────────────────── export function MethodBadge({ method }: { method: string }) { return ( {method} ); } export function StatusBadge({ status }: { status: number }) { return ( {status} ); } export function SectionLabel({ children }: { children: React.ReactNode }) { return (
{children}
); } export function Panel({ children, className }: { children: React.ReactNode; className?: string }) { return ({text}