You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
3 years ago
|
import React from "react";
|
||
|
|
||
|
const persian = {
|
||
|
weight: "وزن",
|
||
|
pageNumber: "تعداد صفحات",
|
||
|
pageType: "نوع کاغذ",
|
||
|
bookNumber: "شماره شابک",
|
||
|
publisher: "انتشارات",
|
||
|
author: "نویسنده",
|
||
|
bookType: "قطع",
|
||
|
publishedYear: "سال انتشار",
|
||
|
};
|
||
|
|
||
|
const Table = ({ specifications }) => {
|
||
|
return (
|
||
|
<ul className="w-full">
|
||
|
{Object.keys(specifications).map((specification, index) => (
|
||
|
<li className="flex my-3">
|
||
|
<div className="bg-white rounded p-3 ml-2" style={{ flex: 2 }}>
|
||
|
{persian[specification]}
|
||
|
</div>
|
||
|
<div className="bg-white rounded p-3" style={{ flex: 8 }}>
|
||
|
{specifications[specification]}
|
||
|
</div>
|
||
|
</li>
|
||
|
))}
|
||
|
</ul>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default Table;
|
||
|
|
||
|
Table.defaultProps = {
|
||
|
specifications: {
|
||
|
weight: "1 کیلوگرم",
|
||
|
pageNumber: "400 صفحه",
|
||
|
pageType: "گلاسه",
|
||
|
bookNumber: "124900985340561870112312499",
|
||
|
publisher: "رزمندگان",
|
||
|
author: "یک نویسنده گمنام",
|
||
|
bookType: "خشتی",
|
||
|
publishedYear: "1399",
|
||
|
},
|
||
|
};
|