master
mahdi andalib 3 years ago
parent 029a21f316
commit 2d8ee5994b
  1. 2
      src/App.js
  2. 31
      src/components/ReactTable5/BasicTable.js
  3. 42
      src/components/ReactTable5/index.js

@ -101,7 +101,7 @@ function App() {
{/* <TableDesign1 /> */}
{/* <ReactTable2 /> */}
{/* <ReactTable3 /> */}
<ReactTable4 />
{/* <ReactTable4 /> */}
<ReactTable5 />
{/* <Digikala /> */}
{/* <HeaderDesign1 />

@ -36,7 +36,8 @@ import {
const BasicTable = ({
settingsIcon,
thead,
listView,
goToPage,
showMore,
addTab,
tabs,
delTab,
@ -356,7 +357,6 @@ const BasicTable = ({
</tbody>
</table>
)}
{/* GRID LIST */}
{activeList === true && (
<div className="flex flex-row gap-4">
@ -376,12 +376,16 @@ const BasicTable = ({
</div>
)}
{/* bottom table */}
<GoToPage
pageIndex={pageIndex}
gotoPage={gotoPage}
pageOptions={pageOptions}
/>
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} />
{goToPage && (
<GoToPage
pageIndex={pageIndex}
gotoPage={gotoPage}
pageOptions={pageOptions}
/>
)}
{showMore && (
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} />
)}
</>
) : (
<EditRow
@ -402,13 +406,6 @@ BasicTable.defaultProps = {
settingsIcon: true,
thead: false,
listView: [
{
icon: list,
},
{
icon: grid,
},
],
goToPage: false,
showMore: false,
};

@ -8,7 +8,7 @@ import MultiRangeInput from "./MultiRangeInput";
import grayLeftArrow from "./gray-arrow-left.svg";
import { BreadCrumb } from "../BreadCrumb";
const ReactTable5 = ({ breadCrumbs, subTitle, title }) => {
const ReactTable5 = ({ breadCrumbs, breadCrumb }) => {
const [tabs, setTabs] = useState([
{ name: "جدول " + breadCrumbs[breadCrumbs.length - 1].name, id: 0 },
]);
@ -35,29 +35,30 @@ const ReactTable5 = ({ breadCrumbs, subTitle, title }) => {
<div className="my-10 w-11/12 mx-auto">
{/* breadCrumb */}
<div className="flex flex-row items-center">
{breadCrumbs.map((breadCrumb, index) => (
<div className="flex flex-row items-center" key={index}>
<span
className={`cursor-pointer text-xs hover:text-blue-900 ${
breadCrumb.active ? "text-blue-900" : "text-blue-400"
}`}
>
{breadCrumb.name}
</span>
{Number(index) !== breadCrumbs.length - 1 && (
<div
className={`mx-2 ${
{breadCrumb &&
breadCrumbs.map((breadCrumb, index) => (
<div className="flex flex-row items-center" key={index}>
<span
className={`cursor-pointer text-xs hover:text-blue-900 ${
breadCrumb.active ? "text-blue-900" : "text-blue-400"
}`}
>
<img src={grayLeftArrow} />
</div>
)}
</div>
))}
{breadCrumb.name}
</span>
{Number(index) !== breadCrumbs.length - 1 && (
<div
className={`mx-2 ${
breadCrumb.active ? "text-blue-900" : "text-blue-400"
}`}
>
<img src={grayLeftArrow} />
</div>
)}
</div>
))}
</div>
<div className="my-7">
<TitleSubtitle />
<TitleSubtitle titleShow={false} subTitleShow={false} />
</div>
<BasicTable
addTab={addTab}
@ -92,6 +93,5 @@ ReactTable5.defaultProps = {
},
],
title: "میزان فروش محصولات",
subTitle: "اطلاعات جداول مشخصاتی کارکنان مجموعه ایران تایر",
breadCrumb: false,
};

Loading…
Cancel
Save