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 /> */} {/* <TableDesign1 /> */}
{/* <ReactTable2 /> */} {/* <ReactTable2 /> */}
{/* <ReactTable3 /> */} {/* <ReactTable3 /> */}
<ReactTable4 /> {/* <ReactTable4 /> */}
<ReactTable5 /> <ReactTable5 />
{/* <Digikala /> */} {/* <Digikala /> */}
{/* <HeaderDesign1 /> {/* <HeaderDesign1 />

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

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

Loading…
Cancel
Save