diff --git a/src/App.js b/src/App.js index 5bf59b8..60651c2 100644 --- a/src/App.js +++ b/src/App.js @@ -42,6 +42,7 @@ import Switch from "./components/Switch"; import SpecifiedDomainRadarChart from "./components/Chart/SpecifiedDomainRadarChart"; import Design1 from "./components/ProductSalesAmount/Design1"; import Design2 from "./components/ProductSalesAmount/Design2"; +import TableDesign1 from "./components/Table/Design1"; function App() { return ( @@ -80,10 +81,11 @@ function App() { {/* */} {/* */} {/* */} - + {/* */} {/* */} {/* */} - + {/* */} + ); diff --git a/src/components/Table/Design1/arrow-down.svg b/src/components/Table/Design1/arrow-down.svg new file mode 100644 index 0000000..9d96b2f --- /dev/null +++ b/src/components/Table/Design1/arrow-down.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/Table/Design1/arrow-up.svg b/src/components/Table/Design1/arrow-up.svg new file mode 100644 index 0000000..dd76cc2 --- /dev/null +++ b/src/components/Table/Design1/arrow-up.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/Table/Design1/index.js b/src/components/Table/Design1/index.js new file mode 100644 index 0000000..c1337cc --- /dev/null +++ b/src/components/Table/Design1/index.js @@ -0,0 +1,145 @@ +import React from "react"; + +import arrowDown from "./arrow-down.svg"; +import arrowUp from "./arrow-up.svg"; + +const TableDesign1 = ({ tableItems, tableSubItems }) => { + return ( +
+
+
+
+
+ + + {tableItems.map((tableItem, index) => ( + + + + + + + ))} + + + {tableSubItems.map((tableSubItem, i) => ( + + + + + + + ))} + +
+ {tableItem.title} + +
+ {tableItem.status} +
+ + +
+
+
+
+ {tableItem.date} +
+ + +
+
+
+
+ {tableItem.payedPrice} +
+ + +
+
+
+ {tableSubItem.title} + + {tableSubItem.status ? "فعال" : "غیر فعال"} + + {tableSubItem.date} + + {tableSubItem.payedPrice} ریال +
+
+
+
+
+
+ ); +}; + +export default TableDesign1; + +TableDesign1.defaultProps = { + tableItems: [ + { + title: "عنوان", + status: "وضعیت", + date: "تاریخ", + payedPrice: "مبلغ پرداختی", + }, + ], + tableSubItems: [ + { + title: "مایکروویر سامسونگ مدل", + status: true, + date: "1400/09/21", + payedPrice: 2400000, + }, + { + title: "آزمون آنلاین درس علوم تجربی", + status: false, + date: "1400/09/21", + payedPrice: 2400000, + }, + ], +};