import React from 'react';
import "./Table.css"

export function Table({ header, children }: any) {
    return (
        <div>
            <table>
                <thead>
                <tr>
                    {
                        header.map((item: any, index: number) => (
                            <th key={index}>{item}</th>
                        ))
                    }
                </tr>
                </thead>
                <tbody>
                    {children}
                </tbody>
            </table>
        </div>
    );
}
