UNPKG

air-command-ui-library

Version:

A React component library for Air Command System with Storybook

50 lines (49 loc) 1.66 kB
import React from 'react'; import { ThemeVariant } from '../../types'; import { ModalField } from './ModalContents'; export interface AirCommandModalProps { isOpen: boolean; onClose: () => void; aircraftId: string; classification: 'FRIENDLY' | 'HOSTILE' | 'NEUTRAL' | 'UNKNOWN'; fields: ModalField[]; theme?: ThemeVariant; onUpdate?: () => void; onDelete?: () => void; onShowHistory?: () => void; isHistoryVisible?: boolean; } /** * Air Command Modal Component * * This is a specialized modal component designed specifically for the Air Command System. * It matches the exact design shown in the provided image with: * - Dark theme by default * - Aircraft ID as the title * - Status badge for classification * - Key-value pairs for aircraft information * - Action buttons (Delete, Show History, Update) * * Usage: * ```tsx * <AirCommandModal * isOpen={isModalOpen} * onClose={() => setIsModalOpen(false)} * aircraftId="XY01234" * classification="FRIENDLY" * fields={[ * { label: 'Type', value: 'COMMERCIAL' }, * { label: 'Latitude', value: '45.004777°' }, * { label: 'Longitude', value: '51.234577°' }, * { label: 'Altitude', value: '35000 feet' }, * { label: 'Heading', value: '311°' }, * { label: 'Speed', value: '500 knots' }, * { label: 'Last Update', value: '21.05.55 (5 seconds ago)' }, * ]} * onUpdate={() => console.log('Update clicked')} * onDelete={() => console.log('Delete clicked')} * onShowHistory={() => console.log('Show History clicked')} * /> * ``` */ export declare const AirCommandModal: React.FC<AirCommandModalProps>;