import styles from "./Table.module.scss";

interface ITableProps {
  data: (string | React.ReactNode)[][];
}

function Table({ data }: ITableProps) {
  return (
    <div className={styles.container}>
      {data.map((row, index) => (
        <div key={`table-row-${index}`} className={styles.row}>
          {row.map((cell, cellIndex) => (
            <div key={`table-cell-${cellIndex}`} className={styles.cell}>
              {!!cell ? cell : "-"}
            </div>
          ))}
        </div>
      ))}
    </div>
  );
}

export default Table;
