import React from 'react' import { forwardRef } from 'react' import { Dropdown } from '../../../Dropdown/Dropdown' import { Tabs } from '../../../Tabs/Tabs' import { Props } from './TableContianer.types' import './TableContainer.css' const TableContainer = forwardRef((props, ref) => { const { children, tabsList, activeTab, handleTabChange, sortbyList, handleSortByChange, sortBy } = props return (
{tabsList.length || sortbyList?.length ? (
{tabsList.length > 0 ? ( {tabsList.map((tab) => ( { handleTabChange && handleTabChange(tab.value) }} >
{tab.displayValue}
))}
) : null} {sortbyList && ( { const value = data.value.toString() handleSortByChange && handleSortByChange(value) }} options={sortbyList} /> )}
) : null} {children}
) }) export default TableContainer