import React from "react";
import classNames from "classnames";
import { DataTable, DataTableProps } from "mantine-datatable";
import styles from "./BaseTable.module.css";

function BaseTable<T>(props: DataTableProps<T>) {
    return (
        <DataTable
            withRowBorders
            striped={false}
            verticalAlign={"center"}
            classNames={{
                root: styles["table-bg"],
                table: styles["table-bg"],
                header: styles["table-bg"],
                footer: styles["table-bg"],
            }}
            className={classNames(
                props.withTableBorder && styles["table-border"]
            )}
            {...props}
        />
    );
}

export default BaseTable;
