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

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

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

export default Table