import { Input } from '@chakra-ui/react'; import { ExcelImportMap } from 'ontime-utils'; import style from './ImportMapTable.module.scss'; export type TableEntry = { label: string; title: keyof ExcelImportMap; value: string }; interface ImportMapTableProps { title: string; fields: TableEntry[]; handleOnChange: (field: keyof ExcelImportMap, value: string) => void; } export default function ImportMapTable(props: ImportMapTableProps) { const { title, fields, handleOnChange } = props; return ( {fields.map((field) => { return ( ); })}
{title}
{ handleOnChange(field.title, event.target.value); }} />
); }