import React, {ReactNode} from 'react';
import "./Table.css"

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