'use client'
import { ReactNode } from "react";

type Props = {
    headings:Array<string>;
    children:ReactNode;
}

export default function TableGen(props:Props){
    return <>
    <table className="table overflow-scroll">
        <thead>
            <tr>
                {props.headings.map((h)=>
                <th key={h} scope="col">{h}</th>
                )}
            </tr>
        </thead>
        <tbody>
            {props.children}
        </tbody>
    </table>
    </>
}