/** @format */

import * as React from 'react';
import {Input} from 'antd';
import Table from '../../../components/table';
import styles from './styles/quota.module.scss';
const {Search} = Input;

interface Iprops {
    title: string;
    onSearch: () => void;
    placeholder: string;
    columns: any[];
    dataSource: any[];
}
const Quota: React.FC<Iprops> = props => {
    const {title, onSearch, placeholder, columns, dataSource} = props;
    return (
        <div className={styles.quotaWrapper}>
            <div className={styles.header}>
                <h3>{title}</h3>
                <Search placeholder={placeholder} onSearch={onSearch} enterButton />
            </div>
            <Table columns={columns} dataSource={dataSource} />
        </div>
    );
};
export default Quota;
