import { useState } from "react"; import type { ReactNode } from "react"; import { AUDIT_INVENTORY, type AuditGroup } from "./inventory"; export function AuditFrame( { children, groups }: { children: ReactNode; groups: readonly AuditGroup[] }, ) { let [width, setWidth] = useState<"wide" | "narrow">("wide"); return ( Chopin design audit A live map of the foundations, controls, surfaces, and authored content in the application. setWidth("wide")} type="button" > Wide setWidth("narrow")} type="button" > Narrow {groups.map(group => {group.label})} {children} ); } export function AuditSection( { children, id, title }: { children: ReactNode; id: string; title: string }, ) { return ( {title} {children} ); } export function AuditPlate( { children, description, item, title }: { children?: ReactNode; description?: string; item?: string; title: string; }, ) { let source = AUDIT_INVENTORY.flatMap(group => group.items) .find(candidate => candidate.id === item)?.source; return ( {title} {source ? {source} : null} {description ? {description} : null} {children} ); } export function StateLabel({ children }: { children: ReactNode }) { return {children}; }
A live map of the foundations, controls, surfaces, and authored content in the application.
{source}
{description}