-
+
-
+
);
}
diff --git a/src/components/ReactTable4/ColumnFilter.js b/src/components/ReactTable4/ColumnFilter.js
deleted file mode 100644
index f70108e..0000000
--- a/src/components/ReactTable4/ColumnFilter.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import React from 'react';
-
-export const ColumnFilter = ({ column }) => {
-
- const { filterValue, setFilter } = column
-
- return (
-
-
-
- Search: {''}
-
- setFilter(e.target.value)} />
-
-
-
- );
-};
diff --git a/src/components/ReactTable4/ColumnSearch.js b/src/components/ReactTable4/ColumnSearch.js
new file mode 100644
index 0000000..8633716
--- /dev/null
+++ b/src/components/ReactTable4/ColumnSearch.js
@@ -0,0 +1,36 @@
+import React, { useState } from "react";
+
+import search from "./search-normal.svg";
+import cancleIcon from "./zarbedar-icon.svg";
+
+export const ColumnSearch = ({ column }) => {
+ const { filterValue, setFilter } = column;
+ const [activeSearchBox, setActiveSearchBox] = useState(false);
+
+ return (
+
+
+ {activeSearchBox && (
+
setActiveSearchBox(false)}
+ />
+ )}
+
+
setFilter(e.target.value)}
+ onFocus={() => setActiveSearchBox(true)}
+ className={`w-9/12 text-xs text-blue-400 rounded focus:outline-none border p-1 focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`}
+ style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }}
+ />
+
+
+ );
+};
diff --git a/src/components/ReactTable4/DropDown.js b/src/components/ReactTable4/DropDown.js
new file mode 100644
index 0000000..3c93430
--- /dev/null
+++ b/src/components/ReactTable4/DropDown.js
@@ -0,0 +1,51 @@
+import React from "react";
+import more from "./more2.svg";
+
+export const DropDown = ({}) => {
+ return (
+
+
+
+
+ );
+};
+
+export default DropDown;
diff --git a/src/components/ReactTable4/EditButtons.js b/src/components/ReactTable4/EditButtons.js
index 3f3919e..f8d0102 100644
--- a/src/components/ReactTable4/EditButtons.js
+++ b/src/components/ReactTable4/EditButtons.js
@@ -1,95 +1,38 @@
import React, { useState } from "react";
+import Table from "./BasicTable";
+
+import DropDown from "./DropDown";
import filter from "./filter.svg";
import plus from "./plus.svg";
-import more from "./more2.svg";
-export function EditButtons({ buttons }) {
- const [selectedButton, setSelectedButton] = useState(null);
+export function EditButtons({}) {
+ const [activeFilter, setActiveFilter] = useState(null);
+ // const [selectedFilterRow, setSelectedFilterRow] = useState(null);
+
return (
- {buttons.map((button, index) => (
-
-
- setSelectedButton(selectedButton === button ? null : button)
- }
- >
-
{button.title}
-
-
-
- ))}
+ {/* add new row */}
+
+ {/* filter */}
+
setSelectedFilterRow(!selectedFilterRow)}
+ alt=""
+ className={`mx-1 p-2 rounded border border-blue-300 cursor-pointer w-8
+ ${activeFilter ? "border" : "border-0"}`}
+ onClick={() => setActiveFilter(!activeFilter)}
+ />
+ {/* dropDown */}
+
);
}
-EditButtons.defaultProps = {
- buttons: [
- {
- logo: plus,
- width: "w-3",
- height: "h-3",
- title: "ثبت جدید",
- backgroundColor: "#65A9FF",
- border: "border-b-4",
- borderColor: "#3686EC",
- padding: "4px 7px",
- components: "d",
- buttonSubItems: [],
- },
- {
- logo: filter,
- width: "w-5",
- height: "h-5",
- title: null,
- backgroundColor: "#F3F8FF",
- border: null,
- borderColor: null,
- components: "a",
- buttonSubItems: [],
- },
- {
- logo: more,
- width: "w-5",
- height: "h-5",
- title: null,
- textColor: null,
- backgroundColor: "#F3F8FF",
- border: null,
- borderColor: null,
- components: "a",
- buttonSubItems: [
- {
- title: "دراپ داون 1",
- },
- ],
- },
- ],
-};
-
-// {
-// logo: settings,
-// width: "w-5",
-// height: "h-5",
-// title: null,
-// textColor: null,
-// backgroundColor: "#F3F8FF",
-// components: "b",
-// },
+EditButtons.defaultProps = {};
diff --git a/src/components/ReactTable4/GlobalFilter.js b/src/components/ReactTable4/GlobalFilter.js
index ea538b4..1ebf2fc 100644
--- a/src/components/ReactTable4/GlobalFilter.js
+++ b/src/components/ReactTable4/GlobalFilter.js
@@ -2,9 +2,10 @@ import React, { useState } from "react";
import { useAsyncDebounce } from "react-table";
import search from "./search-normal.svg";
+import cancleIcon from "./zarbedar-icon.svg";
export const GlobalFilter = ({ filter, setFilter }) => {
- const [openModal, setOpenModal] = useState(true);
+ const [activeSearchBox, setActiveSearchBox] = useState(false);
const [value, setValue] = useState(filter);
@@ -13,15 +14,44 @@ export const GlobalFilter = ({ filter, setFilter }) => {
}, 400);
return (
-
{
- setValue(e.target.value);
- onChange(e.target.value);
- }}
- type="text"
- placeholder="نام کالا را جستجو کنید..."
- className="text-xs rounded-sm pr-4 pl-10 py-2 w-full border border-gray-400 font-light text-lightGrayTextColor placeholder-gray-400 focus:outline-none"
- />
+
+ {activeSearchBox && (
+
setActiveSearchBox(false)}
+ />
+ )}
+
+
setFilter(e.target.value)}
+ onFocus={() => setActiveSearchBox(true)}
+ // onBlur={() => setActiveSearchBox(false)}
+ type="text"
+ className={`text-xs text-blue-400 rounded focus:outline-none border focus:border-blue-200 focus:ring focus:ring-blue-200 focus:ring-opacity-20`}
+ style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }}
+ />
+
);
};
+
+{
+ /*
{
+ setValue(e.target.value);
+ onChange(e.target.value);
+ }}
+ onFocus={() => setActiveSearchBox(true)}
+ // onBlur={() => setActiveSearchBox(false)}
+ type="text"
+ className={`text-xs text-blue-400 rounded focus:outline-none placeholder-blue-400 border`}
+ style={{ backgroundColor: "#F9FBFF", borderColor: "#B5D6FF" }}
+ /> */
+}
diff --git a/src/components/ReactTable4/GoToPage.js b/src/components/ReactTable4/GoToPage.js
new file mode 100644
index 0000000..e18d585
--- /dev/null
+++ b/src/components/ReactTable4/GoToPage.js
@@ -0,0 +1,19 @@
+import React from "react";
+
+export const GoToPage = ({ pageIndex, gotoPage, pageOptions }) => {
+ return (
+
+ صفحه{" "}
+ {
+ const pageNumber = e.target.value ? Number(e.target.value) - 1 : 0;
+ gotoPage(pageNumber);
+ }}
+ />
+ از {pageOptions.length}
+
+ );
+};
diff --git a/src/components/ReactTable4/MOCK_DATA.json b/src/components/ReactTable4/MOCK_DATA.json
index 69f26c0..39fbd7c 100644
--- a/src/components/ReactTable4/MOCK_DATA.json
+++ b/src/components/ReactTable4/MOCK_DATA.json
@@ -1,22 +1,92 @@
[
{
- "name": "mahdi",
- "order-date": "1399/09/27",
- "order-price": 25,
- "order-number": "09120023100",
- "user-job": "مهندس ساختمان",
- "order-status": 1,
- "order-level": 1,
- "history": "مهدی"
+ "name": "خسرو سهرابی",
+ "order_date": "1400/11/09",
+ "order_price": 1,
+ "order_number": "09120023100",
+ "user_job": "مهندس ساختمان",
+ "order_status": 1,
+ "order_level": 1,
+ "birth_place": "استان تهران شهر تهران",
+ "office_phone": "02144407010",
+ "education": "کارشناسی",
+ "job": "فروشنده لوازم خانگی",
+ "field_study": "مدیریت صنعتی",
+ "birth_day": "1368/09/02",
+ "uni": "تهران",
+ "address": "خیابان شریعتی نرسیده به خیابان دولت کوچه عباسی نبش تهیه غذای فارسی پلاک 4 واحد 3",
+ "behaviour": "بچه پرو و دریده شاخ اما کم آزار اهل رفاقت و مرام خلاق نوآور آشنا به صنایع خلاق"
},
{
- "name": "tannaz",
- "order-date": "1399/09/27",
- "order-price": 27,
- "order-number": "09120023100",
- "user-job": "مهندس ساختمان",
- "order-status": 1,
- "order-level": 1,
- "history": "tannaz"
+ "name": "خسرو شکیبایی",
+ "order_date": "1340/04/13",
+ "order_price": 2,
+ "order_number": "09390646589",
+ "user_job": "بازیگر",
+ "order_status": 2,
+ "order_level": 2,
+ "birth_place": "استان تهران شهر تهران",
+ "office_phone": "02144407010",
+ "education": "کارشناسی",
+ "job": "فروشنده لوازم خانگی",
+ "field_study": "مدیریت صنعتی",
+ "birth_day": "1368/09/02",
+ "uni": "تهران",
+ "address": "خیابان شریعتی نرسیده به خیابان دولت کوچه عباسی نبش تهیه غذای فارسی پلاک 4 واحد 3",
+ "behaviour": "بچه پرو و دریده شاخ اما کم آزار اهل رفاقت و مرام خلاق نوآور آشنا به صنایع خلاق"
+ },
+ {
+ "name": "علی علوی",
+ "order_date": "1330/12/05",
+ "order_price": 3,
+ "order_number": "09120403285",
+ "user_job": "تاجر",
+ "order_status": 3,
+ "order_level": 3,
+ "birth_place": "استان تهران شهر تهران",
+ "office_phone": "02144407010",
+ "education": "کارشناسی",
+ "job": "فروشنده لوازم خانگی",
+ "field_study": "مدیریت صنعتی",
+ "birth_day": "1368/09/02",
+ "uni": "تهران",
+ "address": "خیابان شریعتی نرسیده به خیابان دولت کوچه عباسی نبش تهیه غذای فارسی پلاک 4 واحد 3",
+ "behaviour": "بچه پرو و دریده شاخ اما کم آزار اهل رفاقت و مرام خلاق نوآور آشنا به صنایع خلاق"
+ },
+ {
+ "name": "پارسا ایرانی",
+ "order_date": "1372/01/08",
+ "order_price": 4,
+ "order_number": "09120336508",
+ "user_job": "حسابدار",
+ "order_status": 4,
+ "order_level": 4,
+ "birth_place": "استان تهران شهر تهران",
+ "office_phone": "02144407010",
+ "education": "کارشناسی",
+ "job": "فروشنده لوازم خانگی",
+ "field_study": "مدیریت صنعتی",
+ "birth_day": "1368/09/02",
+ "uni": "تهران",
+ "address": "خیابان شریعتی نرسیده به خیابان دولت کوچه عباسی نبش تهیه غذای فارسی پلاک 4 واحد 3",
+ "behaviour": "بچه پرو و دریده شاخ اما کم آزار اهل رفاقت و مرام خلاق نوآور آشنا به صنایع خلاق"
+ },
+ {
+ "name": "محمد محمدی",
+ "order_date": "1389/01/26",
+ "order_price": 5,
+ "order_number": "0913698574",
+ "user_job": "دکتر",
+ "order_status": 5,
+ "order_level": 5,
+ "birth_place": "استان تهران شهر تهران",
+ "office_phone": "02144407010",
+ "education": "کارشناسی",
+ "job": "فروشنده لوازم خانگی",
+ "field_study": "مدیریت صنعتی",
+ "birth_day": "1368/09/02",
+ "uni": "تهران",
+ "address": "خیابان شریعتی نرسیده به خیابان دولت کوچه عباسی نبش تهیه غذای فارسی پلاک 4 واحد 3",
+ "behaviour": "بچه پرو و دریده شاخ اما کم آزار اهل رفاقت و مرام خلاق نوآور آشنا به صنایع خلاق"
}
]
diff --git a/src/components/ReactTable4/NOTUSINGBasicTableDefaultCode.js b/src/components/ReactTable4/NOTUSINGBasicTableDefaultCode.js
deleted file mode 100644
index 968b271..0000000
--- a/src/components/ReactTable4/NOTUSINGBasicTableDefaultCode.js
+++ /dev/null
@@ -1,302 +0,0 @@
-import React, { useMemo } from "react";
-
-import {
- useTable,
- useSortBy,
- useGlobalFilter,
- useFilters,
- usePagination,
- useRowSelect,
- useColumnOrder,
-} from "react-table";
-
-import { COLUMNS } from "./columns";
-
-import { GlobalFilter } from "./GlobalFilter";
-
-import { Checkbox } from "./Checkbox";
-
-import MOCK_DATA from "./MOCK_DATA.json";
-
-const BasicTable = () => {
- const columns = React.useMemo(() => COLUMNS, []);
- const data = useMemo(() => MOCK_DATA, []);
-
- const {
- getTableProps,
- getTableBodyProps,
- headerGroups,
- footerGroups,
- rows,
- page,
- nextPage,
- previousPage,
- canNextPage,
- canPreviousPage,
- pageOptions,
- gotoPage,
- pageCount,
- setPageSize,
- prepareRow,
- allColumns,
- getToggleHideAllColumnsProps,
- setColumnOrder,
- selectedFlatRows,
- state,
- setGlobalFilter,
- } = useTable(
- {
- columns,
- data,
- // initialState: { pageIndex: 2 }
- },
- useColumnOrder,
- useFilters,
- useGlobalFilter,
- useSortBy,
- usePagination,
- useRowSelect,
- (hooks) => {
- hooks.visibleColumns.push((columns) => {
- return [
- {
- id: "selection",
- Header: ({ getToggleAllRowsSelectedProps }) => (
-
- ),
- Cell: ({ row }) => (
-
- ),
- },
- ...columns,
- ];
- });
- }
- );
-
- const changeOrder = () => {
- setColumnOrder([
- "name",
- "order-number",
- "user-job",
- "order-level",
- "order-status",
- "order-price",
- ]);
- };
-
- const { globalFilter, pageIndex, pageSize } = state;
- // const firstPageRows = rows.slice(0, 10);
-
- return (
- <>
-
- {/* search box */}
-
- {/* pagination */}
-
- {/* toggle columns */}
- {/*
-
- Toggle All
-
- {allColumns.map((column) => (
-
-
-
- ))}
-
*/}
-
- {/* Change Column Order */}
- {/*
*/}
-
-
-
- {headerGroups.map((headerGroup) => (
-
- {headerGroup.headers.map((column) => (
-
- {column.render("Header")}
-
- {column.isSorted
- ? column.isSortedDesc
- ? " 🔽"
- : " 🔼"
- : ""}
-
- {/* not using */}
- {/*
- {column.canFilter ? column.render('Filter') : null }
- */}
- |
- ))}
-
- ))}
-
-
-
- {/* not using */}
- {/* {rows.map((row) => {
- prepareRow(row)
- return(
-
- {row.cells.map((cell) => {
- return
- {cell.render('Cell')}
- |
- })}
-
- )
- })} */}
- {page.map((row) => {
- prepareRow(row);
- return (
-
- {row.cells.map((cell) => {
- return (
-
- {cell.render("Cell")}
- |
- );
- })}
-
- );
- })}
-
- {/* not using */}
- {/* {firstPageRows.map((row) => {
- prepareRow(row);
- return (
-
- {row.cells.map((cell) => {
- return (
-
- {cell.render("Cell")}
- |
- );
- })}
-
- );
- })} */}
-
-
- 10 ? "w-full" : "hidden"}`}
- >
- {footerGroups.map((footerGroup) => (
-
- {footerGroup.headers.map((column) => (
-
- {column.render("Footer")}
- |
- ))}
-
- ))}
-
-
-
-
-
- {JSON.stringify(
- {
- selectedFlatRows: selectedFlatRows.map((row) => row.original),
- },
- null,
- 2
- )}
-
-
-
-
-
- Page{" "}
-
- {pageIndex + 1} of {pageOptions.length}
-
- {""}
-
-
-
- | Go to Page:{" "}
- {
- const pageNumber = e.target.value
- ? Number(e.target.value) - 1
- : 0;
- gotoPage(pageNumber);
- }}
- style={{ width: "50px" }}
- />
-
-
-
-
-
-
-
-
-
-
-
- >
- );
-};
-
-export default BasicTable;
diff --git a/src/components/ReactTable4/Pagination.js b/src/components/ReactTable4/Pagination.js
new file mode 100644
index 0000000..de553b4
--- /dev/null
+++ b/src/components/ReactTable4/Pagination.js
@@ -0,0 +1,61 @@
+import React from "react";
+import dobleLeftArrow from "./double-left-arrow.svg";
+import leftArrow from "./left-arrow.svg";
+import rightArrow from "./right-arrow.svg";
+
+export const Pagination = ({
+ gotoPage,
+ canPreviousPage,
+ previousPage,
+ canNextPage,
+ pageCount,
+ nextPage,
+}) => {
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default Pagination;
+
+// Pagination.defaultProps = {
+// pagintaionButtons: [
+// {
+// image: { dobleLeftArrow },
+// click: gotoPage(0),
+// },
+// ],
+// };
diff --git a/src/components/ReactTable4/SelectColumnFilter.js b/src/components/ReactTable4/SelectColumnFilter.js
new file mode 100644
index 0000000..296b659
--- /dev/null
+++ b/src/components/ReactTable4/SelectColumnFilter.js
@@ -0,0 +1,56 @@
+import React from "react";
+
+export const SelectColumnFilter = ({
+ column: { filterValue, setFilter, preFilteredRows, id, render },
+}) => {
+ const options = React.useMemo(() => {
+ const options = new Set();
+ preFilteredRows.forEach((row) => {
+ options.add(row.values[id]);
+ });
+ return [...options.values()];
+ }, [id, preFilteredRows]);
+
+ return (
+
+ );
+};
diff --git a/src/components/ReactTable4/SelectColumnFilter2.js b/src/components/ReactTable4/SelectColumnFilter2.js
new file mode 100644
index 0000000..36d5c6e
--- /dev/null
+++ b/src/components/ReactTable4/SelectColumnFilter2.js
@@ -0,0 +1,56 @@
+import React from "react";
+
+export const SelectColumnFilter2 = ({
+ column: { filterValue, setFilter, preFilteredRows, id, render },
+}) => {
+ const options = React.useMemo(() => {
+ const options = new Set();
+ preFilteredRows.forEach((row) => {
+ options.add(row.values[id]);
+ });
+ return [...options.values()];
+ }, [id, preFilteredRows]);
+
+ return (
+
+ );
+};
diff --git a/src/components/ReactTable4/Settings.js b/src/components/ReactTable4/Settings.js
new file mode 100644
index 0000000..f5e3f77
--- /dev/null
+++ b/src/components/ReactTable4/Settings.js
@@ -0,0 +1,13 @@
+import React from "react";
+import settings from "./settings.svg";
+
+export const Settings = ({}) => {
+ return (
+
+
+
+ );
+};
diff --git a/src/components/ReactTable4/SliderColumnFilter.js b/src/components/ReactTable4/SliderColumnFilter.js
new file mode 100644
index 0000000..f5aa2bb
--- /dev/null
+++ b/src/components/ReactTable4/SliderColumnFilter.js
@@ -0,0 +1,40 @@
+import React from "react";
+
+import cancleIcon from "./zarbedar-icon.svg";
+
+export const SliderColumnFilter = ({
+ column: { filterValue, setFilter, preFilteredRows, id },
+}) => {
+ const [min, max] = React.useMemo(() => {
+ let min = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
+ let max = preFilteredRows.length ? preFilteredRows[0].values[id] : 0;
+ preFilteredRows.forEach((row) => {
+ min = Math.min(row.values[id], min);
+ max = Math.max(row.values[id], max);
+ });
+ return [min, max];
+ }, [id, preFilteredRows]);
+
+ return (
+
+
{
+ setFilter(parseInt(e.target.value, 10));
+ }}
+ />
+
+
setFilter(undefined)}
+ className="cursor-pointer w-2 h-2"
+ />
+
+ {/*
*/}
+
+ );
+};
diff --git a/src/components/ReactTable4/ToggleColumns.js b/src/components/ReactTable4/ToggleColumns.js
new file mode 100644
index 0000000..a90891d
--- /dev/null
+++ b/src/components/ReactTable4/ToggleColumns.js
@@ -0,0 +1,21 @@
+import React from "react";
+
+export const ToggleColumns = ({ allColumns, getToggleHideAllColumnsProps }) => {
+ return (
+
+ );
+};
+
+export default ToggleColumns;
diff --git a/src/components/ReactTable4/columns.js b/src/components/ReactTable4/columns.js
index 795480e..25c5f0f 100644
--- a/src/components/ReactTable4/columns.js
+++ b/src/components/ReactTable4/columns.js
@@ -1,13 +1,14 @@
import { format } from "date-fns";
-import Table, { SelectColumnFilter } from "./BasicTable"; // new
-
-import { ColumnFilter } from "./ColumnFilter";
+import Table from "./BasicTable";
import { OrderStatus } from "./OrderStatus";
import { OrderLevel } from "./OrderLevel";
import { Buttons } from "./Buttons";
import { EditButtons } from "./EditButtons";
+import { SelectColumnFilter } from "./SelectColumnFilter.js";
+import { SelectColumnFilter2 } from "./SelectColumnFilter2.js";
+import { SliderColumnFilter } from "./SliderColumnFilter.js";
export const COLUMNS = [
{
@@ -19,7 +20,8 @@ export const COLUMNS = [
{
Header: "تاریخ سفارش",
Footer: "تاریخ سفارش",
- accessor: "order-date",
+ accessor: "order_date",
+ Filter: SliderColumnFilter,
Cell: ({ value }) => {
return format(new Date(value), "dd/MM/yyyy");
},
@@ -27,32 +29,32 @@ export const COLUMNS = [
{
Header: "مبلغ سفارش",
Footer: "مبلغ سفارش",
- accessor: "order-price",
- Filter: ColumnFilter,
+ accessor: "order_price",
+ Filter: SliderColumnFilter,
},
{
Header: "شماره سفارش",
Footer: "شماره سفارش",
- accessor: "order-number",
+ accessor: "order_number",
},
{
Header: "شغل کاربر",
Footer: "شغل کاربر",
- accessor: "user-job",
+ accessor: "user_job",
},
{
Header: "وضعیت سفارش",
Footer: "وضعیت سفارش",
- accessor: "order-status",
+ accessor: "order_status",
Cell: OrderStatus,
+ Filter: SelectColumnFilter2,
},
{
Header: "سطح اهمیت",
Footer: "سطح اهمیت",
- accessor: "order-level",
+ accessor: "order_level",
Cell: OrderLevel,
- // Filter: SelectColumnFilter,
- // new
+ Filter: SelectColumnFilter,
},
{
Header: EditButtons,
@@ -60,5 +62,6 @@ export const COLUMNS = [
accessor: "edit",
Cell: Buttons,
disableSortBy: true,
+ disableFilters: true,
},
];
diff --git a/src/components/ReactTable4/index.js b/src/components/ReactTable4/index.js
index a99d842..0fc8cd1 100644
--- a/src/components/ReactTable4/index.js
+++ b/src/components/ReactTable4/index.js
@@ -2,11 +2,12 @@ import React, { useRef } from "react";
import BasicTable from "./BasicTable";
// import useDraggableScroll from "use-draggable-scroll";
-const ReactTable4 = ({ breadCrumbs, subTitle, title, className }) => {
+import cancleIcon from "./zarbedar-icon.svg";
+
+const ReactTable4 = ({ breadCrumbs, subTitle, title }) => {
return (
-
+
{/* breadCrumb */}
-
{breadCrumbs.map((breadCrumb, index) => (
@@ -29,7 +30,6 @@ const ReactTable4 = ({ breadCrumbs, subTitle, title, className }) => {
))}
-
{/* page Title */}
@@ -49,47 +49,15 @@ const ReactTable4 = ({ breadCrumbs, subTitle, title, className }) => {
};
window.isDown = false;
export default ReactTable4;
-function Tabbar() {
+
+export function Tabbar({}) {
+ const ref = useRef(null);
+
// const { onMouseDown } = useDraggableScroll(ref);
- const tabs = [
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- "تست۱",
- ];
+ const tabs = ["فروشگاه دانوین", "مهدی عندلیب"];
return (
{
const slider = window.document.querySelector(".tabbar");
window.isDown = true;
@@ -112,19 +80,16 @@ function Tabbar() {
}}
>
{tabs.map((el) => (
- -
- {
- if (window.isDown) return e.preventDefault();
- ///do here
- }}
- aria-current="page"
- className="inline-block py-4 px-4 text-sm font-medium text-center text-blue-600 bg-gray-100 rounded-t-lg active dark:bg-gray-800 dark:text-blue-500"
- >
-
- {el} x
-
-
+
- {
+ if (window.isDown) return e.preventDefault();
+ }}
+ aria-current="page"
+ className="flex flex-row items-center text-sm text-center active px-4 py-4 rounded-sm mx-1"
+ style={{ backgroundColor: "#F1F6FF" }}
+ >
+ {el}
+
))}
diff --git a/src/components/ReactTable4/zarbedar-icon.svg b/src/components/ReactTable4/zarbedar-icon.svg
new file mode 100644
index 0000000..682f7a5
--- /dev/null
+++ b/src/components/ReactTable4/zarbedar-icon.svg
@@ -0,0 +1,6 @@
+
diff --git a/tailwind.config.js b/tailwind.config.js
index a9b04b3..976b37b 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -2,6 +2,8 @@ module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
"./node_modules/@themesberg/flowbite/**/*.js",
+ "./src/**/*.{html,js}",
+ "./node_modules/tw-elements/dist/js/**/*.js",
],
theme: {
extend: {},
@@ -78,5 +80,8 @@ module.exports = {
darkCrimsonBorderColor: "#132F52",
}),
},
- plugins: [require("@themesberg/flowbite/plugin")],
+ plugins: [
+ require("@themesberg/flowbite/plugin"),
+ require("tw-elements/dist/plugin"),
+ ],
};
diff --git a/yarn.lock b/yarn.lock
index 047b4b9..bc39f99 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3751,6 +3751,13 @@ dom-serializer@^1.0.1:
domhandler "^4.2.0"
entities "^2.0.0"
+dom7@^4.0.4:
+ version "4.0.4"
+ resolved "https://registry.yarnpkg.com/dom7/-/dom7-4.0.4.tgz#8b68c5d8e5e2ed0fddb1cb93e433bc9060c8f3fb"
+ integrity sha512-DSSgBzQ4rJWQp1u6o+3FVwMNnT5bzQbMb+o31TjYYeRi05uAcpF8koxdfzeoe5ElzPmua7W7N28YJhF7iEKqIw==
+ dependencies:
+ ssr-window "^4.0.0"
+
domelementtype@1:
version "1.3.1"
resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz"
@@ -8127,6 +8134,11 @@ sprintf-js@~1.0.2:
resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+ssr-window@^4.0.0, ssr-window@^4.0.2:
+ version "4.0.2"
+ resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-4.0.2.tgz#dc6b3ee37be86ac0e3ddc60030f7b3bc9b8553be"
+ integrity sha512-ISv/Ch+ig7SOtw7G2+qkwfVASzazUnvlDTwypdLoPoySv+6MqlOV10VwPSE6EWkGjhW50lUmghPmpYZXMu/+AQ==
+
stable@^0.1.8:
version "0.1.8"
resolved "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz"
@@ -8362,6 +8374,14 @@ sweetalert2@^11.3.4:
resolved "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.3.4.tgz"
integrity sha512-o7owEtVtpqnB8y3BDCRn2taYb7URcf6RIUm120LjFxt8IHfPIm0UeHuiS3nEp5r9RKm5GlSSJOh/yuapUQcYcQ==
+swiper@^8.0.6:
+ version "8.0.6"
+ resolved "https://registry.yarnpkg.com/swiper/-/swiper-8.0.6.tgz#3996d3212cb73b93e9f274e18ea58c029340c7c7"
+ integrity sha512-Ssyu1+FeNATF/G8e84QG+ZUNtUOAZ5vngdgxzczh0oWZPhGUVgkdv+BoePUuaCXLAFXnwVpNjgLIcGnxMdmWPA==
+ dependencies:
+ dom7 "^4.0.4"
+ ssr-window "^4.0.2"
+
symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz"
@@ -8561,9 +8581,9 @@ tsutils@^3.21.0:
tslib "^1.8.1"
tw-elements@^1.0.0-alpha8:
- version "1.0.0-alpha8"
- resolved "https://registry.npmjs.org/tw-elements/-/tw-elements-1.0.0-alpha8.tgz"
- integrity sha512-feqb4XmHWH8KUOT7KEC3lc258VmypcI6ettdR9adN/dEfk9wXcp/G+XPOhnAAQiXeyTDOCuDF/GNo6kMN++YXw==
+ version "1.0.0-alpha9"
+ resolved "https://registry.npmjs.org/tw-elements/-/tw-elements-1.0.0-alpha9.tgz"
+ integrity sha512-Qw88PhQQQzQ6Ohsaze8FBy3ijMJnvMe0BeD5f31tfi5KAi39y6QvmgRBxnSnLNmpvq5ItxNOxlVKMPfUCgDwfw==
dependencies:
"@popperjs/core" "^2.6.0"
bootstrap "^5.1.3"
@@ -8706,7 +8726,7 @@ url@^0.11.0:
use-draggable-scroll@^0.1.0:
version "0.1.0"
- resolved "https://registry.yarnpkg.com/use-draggable-scroll/-/use-draggable-scroll-0.1.0.tgz#ca7967eeec9d6a53f965b84f9c295c214aa43ed7"
+ resolved "https://registry.npmjs.org/use-draggable-scroll/-/use-draggable-scroll-0.1.0.tgz"
integrity sha512-mX6nT3cUqOTtA+8QUH9HfdKtzI6Oquj9QIB0wALWZYmWogNQ746MaUcmqKOKCIlt2UH6egxhSKNPiSlfEqmKhA==
util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: