UNPKG

react-svg-seatmap

Version:

React components that render a highly-customizable seatmap based on a provided SVG

23 lines (22 loc) 737 B
import { ReactNode } from 'react'; import { SeatmapControl } from '../../../types/SeatmapControl.types'; export interface SeatDisplay { id: number; cssSelector: string; color?: string; icon?: ReactNode; tooltipContent?: ReactNode; } export interface RawSeatmapProps { availableSeats: SeatDisplay[]; selectedSeatIds?: number[]; svg: string; showZoomControls?: boolean; allowDragAndPan?: boolean; leftControls?: SeatmapControl[]; rightControls?: SeatmapControl[]; onSeatSelect?: (selectedSeat: SeatDisplay) => void; onSeatDeselect?: (selectedSeat: SeatDisplay) => void; onSeatHover?: (hoveredSeat: SeatDisplay) => void; onSeatHoverEnd?: (hoveredSeat: SeatDisplay) => void; }