Skip to main content

CameraDetailModal

A modal dialog component for displaying detailed camera information and live feed.

πŸ“‹ Overview​

PropertyValue
Filesrc/components/CameraDetailModal.tsx
TypeReact Functional Component
AuthorUIP Team
Version1.0.0

🎯 Purpose​

  • Display camera details in a modal overlay
  • Show live camera feed or latest snapshot
  • Display real-time traffic metrics
  • Historical data and trends

πŸš€ Usage​

import { CameraDetailModal } from '@/components/CameraDetailModal';

function MapComponent() {
const [selectedCamera, setSelectedCamera] = useState(null);

return (
<>
<TrafficMap onCameraClick={setSelectedCamera} />
{selectedCamera && (
<CameraDetailModal
camera={selectedCamera}
onClose={() => setSelectedCamera(null)}
/>
)}
</>
);
}

πŸ“¦ Props​

PropTypeRequiredDefaultDescription
cameraCameraYes-Camera data object
onClose() => voidYes-Close handler
showLiveFeedbooleanNotrueShow live video
showHistorybooleanNotrueShow historical data

πŸ“Š Modal Sections​

  1. Header - Camera name, status, location
  2. Live Feed - Real-time or latest image
  3. Metrics - Vehicle count, speed, congestion
  4. History - Trend charts and statistics

See the complete components reference for all available components.